diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java index 4b47c91..22314cd 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java @@ -133,10 +133,11 @@ public class DesignBrowser { treeViewer.refresh(); }); } else if(IHierNode.LOADING_FINISHED.equals(evt.getPropertyName())) { - treeViewer.getTree().getDisplay().asyncExec(() -> { - treeViewer.update(waveformViewerPart.getDatabase(), null); - DesignBrowser.this.updateButtons(); - }); + if(!treeViewer.getControl().isDisposed()) + treeViewer.getTree().getDisplay().asyncExec(() -> { + treeViewer.update(waveformViewerPart.getDatabase(), null); + DesignBrowser.this.updateButtons(); + }); } }; @@ -596,6 +597,7 @@ public class DesignBrowser { * Apply. */ public void apply() { + if(treeViewer.getControl().isDisposed()) return; treeViewer.setExpandedElements(expandedElements); treeViewer.setSelection(treeSelection, true); txTableViewer.setSelection(tableSelection, true);