Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorWarren Paul2008-05-08 19:55:09 -0400
committerWarren Paul2008-05-08 19:55:09 -0400
commit97f1304af973dcd90cbfe1da3a4ab8cd0943fbdc (patch)
treea2de6dab106a02e34ed438214365659aed4040d4 /debug
parent19b5878bd9690e24e169874bc5992d583d7b00ad (diff)
downloadorg.eclipse.cdt-97f1304af973dcd90cbfe1da3a4ab8cd0943fbdc.tar.gz
org.eclipse.cdt-97f1304af973dcd90cbfe1da3a4ab8cd0943fbdc.tar.xz
org.eclipse.cdt-97f1304af973dcd90cbfe1da3a4ab8cd0943fbdc.zip
don't use the control if already disposed.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesContentProvider.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesContentProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesContentProvider.java
index 51ebb8462d..22ca3a1327 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesContentProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesContentProvider.java
@@ -56,16 +56,17 @@ class ExecutablesContentProvider extends ColumnLabelProvider implements IStructu
protected IStatus run(IProgressMonitor monitor) {
IStatus status = em.refreshExecutables(monitor);
- // Are we in the UIThread? If so spin it until we are
- // done
- if (viewer.getControl().getDisplay().getThread() == Thread.currentThread()) {
- viewer.refresh(inputElement);
- } else {
- viewer.getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- viewer.refresh(inputElement);
- }
- });
+ // Are we in the UIThread? If so spin it until we are done
+ if (!viewer.getControl().isDisposed()) {
+ if (viewer.getControl().getDisplay().getThread() == Thread.currentThread()) {
+ viewer.refresh(inputElement);
+ } else {
+ viewer.getControl().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ viewer.refresh(inputElement);
+ }
+ });
+ }
}
monitor.done();

Back to the top