avoid widget is disposed exception
authorKatja Luther <k.luther@bgbm.org>
Mon, 29 Jun 2020 11:48:44 +0000 (13:48 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 29 Jun 2020 11:48:44 +0000 (13:48 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java

index 723d166..ce1e3ec 100644 (file)
@@ -194,13 +194,13 @@ public class FactualDataPartE4 extends AbstractCdmEditorPartE4
         Object[] expandedObjects = null;
         if (!viewer.getControl().isDisposed()){
             expandedObjects = ((TreeViewer)viewer).getExpandedElements();
+        }else{
+            return;
         }
         for(FeatureNodeContainerTree containerTree : featureNodeContainerCache.values()){
             containerTree.buildTree();
         }
-        if (featureNodeContainerCache.isEmpty()){
-//            return;
-        }
+
         viewer.refresh();
         super.changed(object);
         ((TreeViewer) viewer).setExpandedElements(expandedObjects);