From 0235029573e316e95a00c319bf8b922d56101e89 Mon Sep 17 00:00:00 2001 From: lempinen Date: Fri, 1 Oct 2010 07:10:39 +0000 Subject: [PATCH] Null check git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@18166 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../org/simantics/sysdyn/ui/properties/VariableNameUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) { -- 2.47.1