]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
(refs #5512) Module validation extension function fails for removed variables
authorjussi.koskela <jussi.koskela@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 27 Nov 2014 08:24:57 +0000 (08:24 +0000)
committerjussi.koskela <jussi.koskela@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 27 Nov 2014 08:24:57 +0000 (08:24 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30616 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java

index 2eeadea2cf23eeb17442dec161b9d83b180d9196..118bfaae4b89aca2e16e31684bdad09339c6464d 100644 (file)
@@ -278,7 +278,9 @@ public class UnitFunction {
             \r
             Layer0 L0 = Layer0.getInstance(graph);\r
             Resource configuration = graph.getPossibleObject(r, L0.PartOf);\r
+            if(configuration == null) continue;\r
             Resource possibleModule = graph.getPossibleObject(configuration, L0.PartOf);\r
+            if(possibleModule == null) continue;\r
             if(graph.isInheritedFrom(possibleModule, SR.Module) && !searchedModuleTypes.contains(possibleModule)) {\r
                 searchedModuleTypes.add(possibleModule);\r
                 for(Resource model : graph.syncRequest(new ObjectsWithType(Simantics.getProject().get(), L0.ConsistsOf, SR.SysdynModel))) {\r