]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
diagramRuntime is checked for null before it is used
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 28 Oct 2013 11:03:48 +0000 (11:03 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 28 Oct 2013 11:03:48 +0000 (11:03 +0000)
refs #4504

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@28137 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SelectionUpdaterParticipant.java

index f610101524c04269a1f7a10e3b1e1b1c624a809b..023c78ce4e6151220fff976d46f7301c68fad221 100644 (file)
@@ -73,6 +73,11 @@ public class SelectionUpdaterParticipant extends AbstractDiagramParticipant {
         @Override\r
         public void perform(WriteGraph graph) throws DatabaseException {\r
             Resource diagramRuntime = diagram.getHint(DiagramModelHints.KEY_DIAGRAM_RUNTIME_RESOURCE);\r
+            \r
+            if(diagramRuntime == null) {\r
+                return;\r
+            }\r
+            \r
             SysdynResource SR = SysdynResource.getInstance(graph);\r
             DiagramResource DR = DiagramResource.getInstance(graph);\r
 \r