From: Tuukka Lehtonen Date: Fri, 14 Sep 2018 12:38:27 +0000 (+0300) Subject: Added null check after getPossibleType(STR.Component) X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=2391d4cda4c356c2b3de3bff75b2804ef3226835;p=simantics%2Fplatform.git Added null check after getPossibleType(STR.Component) gitlab #118 Change-Id: I9b2d5f82ca9eb7a769cde44d925ff93437461175 (cherry picked from commit c837c3cf6d782fa6af127cf2f02d74de2b362fd3) --- 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 e0b93837e..db2d5eae2 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 @@ -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));