]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added null check after getPossibleType(STR.Component) 89/2189/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Sep 2018 12:38:27 +0000 (15:38 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Sep 2018 12:38:27 +0000 (15:38 +0300)
gitlab #118

Change-Id: I9b2d5f82ca9eb7a769cde44d925ff93437461175

bundles/org.simantics.structural2/src/org/simantics/structural2/variables/ActualConnectionDescriptor.java

index e0b93837ee9765deac16ba1ba2ce4dc1af5e6198..db2d5eae283f4d617fadf8c20243c7fcaea0e506 100644 (file)
@@ -47,7 +47,7 @@ class ActualConnectionDescriptor extends AbstractVariableConnectionPointDescript
                        
                StructuralResource2 STR = StructuralResource2.getInstance(graph);
                Resource type = graph.getPossibleType(parameter.component, STR.Component);
-               if(graph.syncRequest(new IsLeafType(type))) return null;
+               if (type != null && graph.syncRequest(new IsLeafType(type))) return null;
 
                        return Functions.computeInterfacePaths(graph, parameter.getVariable(graph).getParent(graph));