Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java
index 87916c0198..6c2f265c34 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -138,7 +138,9 @@ boolean runAsyncMessages (boolean all) {
lock.throwable = t;
SWT.error (SWT.ERROR_FAILED_EXEC, t);
} finally {
- display.sendPostEvent(null);
+ if (display != null && !display.isDisposed()) {
+ display.sendPostEvent(null);
+ }
syncThread = null;
lock.notifyAll ();
}
@@ -184,7 +186,9 @@ protected void syncExec (Runnable runnable) {
try {
runnable.run();
} finally {
- display.sendPostEvent(null);
+ if (display != null && !display.isDisposed()) {
+ display.sendPostEvent(null);
+ }
}
}
return;

Back to the top