]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Added null check after getPossibleType(STR.Component) 80/2180/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 13 Sep 2018 19:09:39 +0000 (22:09 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 13 Sep 2018 19:10:40 +0000 (19:10 +0000)
gitlab #118

Change-Id: I89c4f6921c1ee6c6decd833045e9856d4df52011

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