Skip to content

Commit 467d4f5

Browse files
committed
UI component being attempted to be disposed in a non-ui thread. Updated
as per review comments.
1 parent b4ce63d commit 467d4f5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.eclipse.e4.ui.di.Focus;
3333
import org.eclipse.e4.ui.di.Persist;
3434
import org.eclipse.e4.ui.di.PersistState;
35+
import org.eclipse.e4.ui.di.UISynchronize;
3536
import org.eclipse.e4.ui.internal.workbench.Activator;
3637
import org.eclipse.e4.ui.internal.workbench.Policy;
3738
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
@@ -418,9 +419,13 @@ public void create() {
418419
}
419420

420421
@PreDestroy
421-
void destroy() {
422+
void destroy(UISynchronize sync) {
422423
if (!alreadyDisposed) {
423-
invalidate();
424+
sync.syncExec(() -> {
425+
if (!alreadyDisposed) {
426+
invalidate();
427+
}
428+
});
424429
}
425430

426431
eventBroker.unsubscribe(widgetSetHandler);

0 commit comments

Comments
 (0)