]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fixing an NPE in Sysdyn loops (refs #4990).
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 23 Jun 2014 11:15:01 +0000 (11:15 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 23 Jun 2014 11:15:01 +0000 (11:15 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29687 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java

index 731151f15ca64aba870d2e774edb947ca6a63c98..4203b80a82d57c32231325554a5f75bcedf3dc96 100644 (file)
@@ -180,7 +180,9 @@ public class LoopUtils {
                                        dependingVariables.add(head);\r
                                }\r
                        }\r
-                       elementaryLoopItems.get(original).dependencies.addAll(dependingVariables);\r
+                       ElementaryLoopItem el = elementaryLoopItems.get(original);\r
+                       if (el != null)\r
+                               el.dependencies.addAll(dependingVariables);\r
                }\r
                \r
                // Fill the adjacent matrix\r