Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2017-04-24 04:15:44 -0400
committerGerrit Code Review @ Eclipse.org2017-04-24 07:35:06 -0400
commitfffe6bbf8071e88f8148d5de3562048c8a40a508 (patch)
tree3ef0ef1739dfe7fce598177d201defddb1c43a76 /dsf-gdb
parentcc0955b823d3b01474575e17b1d3a907d4796eeb (diff)
downloadorg.eclipse.cdt-fffe6bbf8071e88f8148d5de3562048c8a40a508.tar.gz
org.eclipse.cdt-fffe6bbf8071e88f8148d5de3562048c8a40a508.tar.xz
org.eclipse.cdt-fffe6bbf8071e88f8148d5de3562048c8a40a508.zip
Bug 515653: Fix SWT disposed exception
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsole.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsole.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsole.java
index 5da677eee6..b29095c06b 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsole.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/TracingConsole.java
@@ -30,6 +30,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.IOConsole;
@@ -148,13 +149,10 @@ public class TracingConsole extends IOConsole {
final String newName = computeName();
String name = getName();
if (!name.equals(newName)) {
- Runnable r = new Runnable() {
- @Override
- public void run() {
- setName(newName);
- }
- };
- PlatformUI.getWorkbench().getDisplay().asyncExec(r);
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ if (!display.isDisposed()) {
+ display.asyncExec(() -> setName(newName));
+ }
}
}

Back to the top