From: Tuukka Lehtonen Date: Thu, 13 Sep 2018 19:09:39 +0000 (+0300) Subject: Added null check after getPossibleType(STR.Component) X-Git-Tag: v1.43.0~136^2~375^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=3d16f15713bbd3cde5ad51ab225bba16fd6d68d1 Added null check after getPossibleType(STR.Component) gitlab #118 Change-Id: I89c4f6921c1ee6c6decd833045e9856d4df52011 --- diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/variables/ActualConnectionDescriptor.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/variables/ActualConnectionDescriptor.java index 716d4a001..f79bdb0b5 100644 --- a/bundles/org.simantics.structural2/src/org/simantics/structural2/variables/ActualConnectionDescriptor.java +++ b/bundles/org.simantics.structural2/src/org/simantics/structural2/variables/ActualConnectionDescriptor.java @@ -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; }