Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2015-11-10 11:04:15 +0000
committerAnton Leherbauer2015-11-10 11:04:15 +0000
commitb720c815df2f503692b1a485ad8069772d213634 (patch)
tree5dd0d64fdbf8c28a1354035dc405a6a36014ff82
parent843bbfc079402a5c1f35661a3da792239306dba6 (diff)
downloadorg.eclipse.tcf-b720c815df2f503692b1a485ad8069772d213634.tar.gz
org.eclipse.tcf-b720c815df2f503692b1a485ad8069772d213634.tar.xz
org.eclipse.tcf-b720c815df2f503692b1a485ad8069772d213634.zip
TCF Debugger: Handle occasional SWT Exception on shutdown
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java
index 6cda3251f..cbfa97f29 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelProxy.java
@@ -36,6 +36,7 @@ import org.eclipse.jface.viewers.ITreeViewerListener;
import org.eclipse.jface.viewers.TreeExpansionEvent;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.widgets.Display;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
@@ -568,7 +569,12 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy, Ru
boolean found;
public void run() {
if (viewer instanceof IInternalTreeModelViewer) {
- found = ((IInternalTreeModelViewer)viewer).findElementIndex(TreePath.EMPTY, launch) >= 0;
+ try {
+ found = ((IInternalTreeModelViewer)viewer).findElementIndex(TreePath.EMPTY, launch) >= 0;
+ } catch (SWTException e) {
+ // viewer is already disposed
+ return;
+ }
}
Protocol.invokeLater(new Runnable() {
public void run() {

Back to the top