From 4e4d68da8b2ca2fc74b2be7d28c357ed31735568 Mon Sep 17 00:00:00 2001 From: miettinen Date: Mon, 23 Jun 2014 11:15:01 +0000 Subject: [PATCH] Fixing an NPE in Sysdyn loops (refs #4990). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29687 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/sysdyn/utils/LoopUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java index 731151f1..4203b80a 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java @@ -180,7 +180,9 @@ public class LoopUtils { dependingVariables.add(head); } } - elementaryLoopItems.get(original).dependencies.addAll(dependingVariables); + ElementaryLoopItem el = elementaryLoopItems.get(original); + if (el != null) + el.dependencies.addAll(dependingVariables); } // Fill the adjacent matrix -- 2.47.1