From: miettinen Date: Mon, 23 Jun 2014 11:15:01 +0000 (+0000) Subject: Fixing an NPE in Sysdyn loops (refs #4990). X-Git-Tag: v1.29.0~265 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=4e4d68da8b2ca2fc74b2be7d28c357ed31735568;p=simantics%2Fsysdyn.git 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 --- 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