add dispose check in case view is closed while loading db
This commit is contained in:
parent
25545dac51
commit
a077389b83
|
@ -133,6 +133,7 @@ public class DesignBrowser {
|
||||||
treeViewer.refresh();
|
treeViewer.refresh();
|
||||||
});
|
});
|
||||||
} else if(IHierNode.LOADING_FINISHED.equals(evt.getPropertyName())) {
|
} else if(IHierNode.LOADING_FINISHED.equals(evt.getPropertyName())) {
|
||||||
|
if(!treeViewer.getControl().isDisposed())
|
||||||
treeViewer.getTree().getDisplay().asyncExec(() -> {
|
treeViewer.getTree().getDisplay().asyncExec(() -> {
|
||||||
treeViewer.update(waveformViewerPart.getDatabase(), null);
|
treeViewer.update(waveformViewerPart.getDatabase(), null);
|
||||||
DesignBrowser.this.updateButtons();
|
DesignBrowser.this.updateButtons();
|
||||||
|
@ -596,6 +597,7 @@ public class DesignBrowser {
|
||||||
* Apply.
|
* Apply.
|
||||||
*/
|
*/
|
||||||
public void apply() {
|
public void apply() {
|
||||||
|
if(treeViewer.getControl().isDisposed()) return;
|
||||||
treeViewer.setExpandedElements(expandedElements);
|
treeViewer.setExpandedElements(expandedElements);
|
||||||
treeViewer.setSelection(treeSelection, true);
|
treeViewer.setSelection(treeSelection, true);
|
||||||
txTableViewer.setSelection(tableSelection, true);
|
txTableViewer.setSelection(tableSelection, true);
|
||||||
|
|
Loading…
Reference in New Issue