From: lempinen Date: Fri, 1 Oct 2010 07:10:39 +0000 (+0000) Subject: Null check X-Git-Tag: simantics-1.2.0~18 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=0235029573e316e95a00c319bf8b922d56101e89;p=simantics%2Fsysdyn.git Null check git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@18166 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableNameUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableNameUtils.java index 11a6a401..b73db9ee 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableNameUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableNameUtils.java @@ -33,7 +33,8 @@ public class VariableNameUtils { Resource configuration = graph.getSingleObject(variable, l0.PartOf); for(Resource r : graph.getObjects(configuration, l0.ConsistsOf)) { if(graph.isInstanceOf(r, sr.IndependentVariable)) { - Resource s = graph.getSingleObject(r, sr.HasExpression); + Resource s = graph.getPossibleObject(r, sr.HasExpression); + if(s == null) continue; for(Resource p : graph.getPredicates(s)) { Resource o = graph.getPossibleObject(s, p); if(o != null && graph.isInstanceOf(o, l0.String)) {