diff --git a/feta/network/NodeTypes.java b/feta/network/NodeTypes.java index 0baafaa..336abac 100644 --- a/feta/network/NodeTypes.java +++ b/feta/network/NodeTypes.java @@ -37,7 +37,10 @@ public static void setNodeType(int nodeNo, String nodeType) /** Return numbers of all nodes with a given type*/ public static HashSet getNodesOfType (String type) { - return new HashSet(nt_.nodesByType_.get(type)); + HashSet nodes= nt_.nodesByType_.get(type); + if (nodes == null) + return null; + return new HashSet(nodes); } /** Get current list of types */