]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Null check for saving equations before experiment actions. (refs #4130)
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 28 Feb 2013 06:52:31 +0000 (06:52 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 28 Feb 2013 06:52:31 +0000 (06:52 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26935 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/HandlerUtils.java

index af0297607a07bd7a9a346564f928a74333cdcd94..05771fbee63f9078c0400528a28ed66b80e20777 100644 (file)
@@ -22,6 +22,12 @@ public class HandlerUtils {
         if (event.getTrigger() instanceof Event) {\r
             Event trigger = (Event)event.getTrigger();\r
             Control focusControl = trigger.display.getFocusControl();\r
+            if(focusControl == null) {\r
+                new Exception(\r
+                        "Could not determine, if equation needs to be saved before action. focusControl == null")\r
+                .printStackTrace();\r
+                return;\r
+            }\r
             Composite parent = focusControl.getParent();\r
             \r
             /* Scan bottom-up if we come across an EquationTab. \r