Fix possible "Widget is disposed" exception
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 13 Jan 2016 06:54:25 +0000 (07:54 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 13 Jan 2016 06:54:25 +0000 (07:54 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java

index 949980cbb20378f4923fef68fc36a7c3d7e7de26..5ef7e43ec7dda8bf7682fba084d2927386cdc926 100644 (file)
@@ -534,8 +534,10 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
     @Override
     public void contextStop(IMemento memento, IProgressMonitor monitor) {
         derivateSearchCompositeController.setEnabled(false);
-        viewer.getTree().setEnabled(false);
-        viewer.setInput(null);
+        if(!viewer.getTree().isDisposed()) {
+            viewer.getTree().setEnabled(false);
+            viewer.setInput(null);
+        }
     }
 
     /**