]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "Added null check after getPossibleType(STR.Component)" into release/1.35.1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Mon, 25 Feb 2019 10:00:23 +0000 (10:00 +0000)
committerGerrit Code Review <gerrit2@simantics>
Mon, 25 Feb 2019 10:00:23 +0000 (10:00 +0000)
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));