From: jussi.koskela Date: Thu, 27 Nov 2014 08:24:57 +0000 (+0000) Subject: (refs #5512) Module validation extension function fails for removed variables X-Git-Tag: v1.29.0~144 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=c403a4dc72222b75b5a435d7d8ce2723769d6dc6;p=simantics%2Fsysdyn.git (refs #5512) Module validation extension function fails for removed variables git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30616 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java index 2eeadea2..118bfaae 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/validation/UnitFunction.java @@ -278,7 +278,9 @@ public class UnitFunction { Layer0 L0 = Layer0.getInstance(graph); Resource configuration = graph.getPossibleObject(r, L0.PartOf); + if(configuration == null) continue; Resource possibleModule = graph.getPossibleObject(configuration, L0.PartOf); + if(possibleModule == null) continue; if(graph.isInheritedFrom(possibleModule, SR.Module) && !searchedModuleTypes.contains(possibleModule)) { searchedModuleTypes.add(possibleModule); for(Resource model : graph.syncRequest(new ObjectsWithType(Simantics.getProject().get(), L0.ConsistsOf, SR.SysdynModel))) {