]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
refs #5204
authorjsimomaa <jsimomaa@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 22 Aug 2014 05:40:27 +0000 (05:40 +0000)
committerjsimomaa <jsimomaa@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 22 Aug 2014 05:40:27 +0000 (05:40 +0000)
Fixing SWTException widget is disposed

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

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.java

index 741cfcc20a92ea7311409075a37a6e3090f2d767..0a2e68ecf32540d7c742f17941a3093aa6bece89 100644 (file)
@@ -408,9 +408,12 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg
             \r
             @Override\r
             public void run() {\r
-                up.getControl().setEnabled(finalEnabled);\r
-                down.getControl().setEnabled(finalEnabled);\r
-                remove.getControl().setEnabled(finalEnabled);     \r
+                if (!up.getControl().isDisposed())\r
+                    up.getControl().setEnabled(finalEnabled);\r
+                if (!down.getControl().isDisposed())\r
+                    down.getControl().setEnabled(finalEnabled);\r
+                if (!remove.getControl().isDisposed())\r
+                    remove.getControl().setEnabled(finalEnabled);     \r
             }\r
         });\r
     }\r