]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Null check
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 1 Oct 2010 07:10:39 +0000 (07:10 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 1 Oct 2010 07:10:39 +0000 (07:10 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@18166 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableNameUtils.java

index 11a6a4015203f787420ce28130c8dbe0383e95eb..b73db9ee1c3445beed2a451a689bdfdc308b52d8 100644 (file)
@@ -33,7 +33,8 @@ public class VariableNameUtils {
                Resource configuration = graph.getSingleObject(variable, l0.PartOf);\r
                for(Resource r : graph.getObjects(configuration, l0.ConsistsOf)) {\r
                        if(graph.isInstanceOf(r, sr.IndependentVariable)) {\r
-                               Resource s = graph.getSingleObject(r, sr.HasExpression);\r
+                               Resource s = graph.getPossibleObject(r, sr.HasExpression);\r
+                               if(s == null) continue;\r
                                for(Resource p : graph.getPredicates(s)) {\r
                                        Resource o = graph.getPossibleObject(s, p);\r
                                        if(o != null && graph.isInstanceOf(o, l0.String)) {\r