]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added null check after getPossibleType(STR.Component) 81/2681/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Sep 2018 12:38:27 +0000 (15:38 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Mon, 25 Feb 2019 09:02:24 +0000 (09:02 +0000)
gitlab #118

Change-Id: I9b2d5f82ca9eb7a769cde44d925ff93437461175
(cherry picked from commit c837c3cf6d782fa6af127cf2f02d74de2b362fd3)

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));