Merge "Added null check after getPossibleType(STR.Component)"
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Sep 2018 12:34:14 +0000 (12:34 +0000)
committerGerrit Code Review <gerrit2@simantics>
Fri, 14 Sep 2018 12:34:14 +0000 (12:34 +0000)
bundles/org.simantics.structural2/src/org/simantics/structural2/variables/ActualConnectionDescriptor.java

index 716d4a0017014e3cb727a4d1b26c587f71411680..f79bdb0b59187f7509a4b59c228cf0f53a12934d 100644 (file)
@@ -94,7 +94,7 @@ class ActualConnectionDescriptor extends AbstractVariableConnectionPointDescript
                
                StructuralResource2 STR = StructuralResource2.getInstance(graph);
                Resource type = graph.getPossibleType(component, STR.Component);
-               return graph.syncRequest(new IsLeafType(type));
+               return type != null ? graph.syncRequest(new IsLeafType(type)) : false;
                
        }