From c403a4dc72222b75b5a435d7d8ce2723769d6dc6 Mon Sep 17 00:00:00 2001 From: "jussi.koskela" Date: Thu, 27 Nov 2014 08:24:57 +0000 Subject: [PATCH] (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 --- .../src/org/simantics/sysdyn/ui/validation/UnitFunction.java | 2 ++ 1 file changed, 2 insertions(+) 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))) { -- 2.47.1