Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Billström2020-01-21 11:24:48 +0000
committerLars Vogel2020-01-22 22:05:24 +0000
commite4d2ebba02d40570f7aa834c6c2037ef6c25017b (patch)
tree063d6ca26993782b407f87efa2b4ee0da1279cb4
parentc2839cf6db6e199ebc33124e7101107f56cc60c9 (diff)
downloadeclipse.platform.ui-e4d2ebba02d40570f7aa834c6c2037ef6c25017b.tar.gz
eclipse.platform.ui-e4d2ebba02d40570f7aa834c6c2037ef6c25017b.tar.xz
eclipse.platform.ui-e4d2ebba02d40570f7aa834c6c2037ef6c25017b.zip
Bug 559368 - org.eclipse.swt.SWTException: Widget is disposed.I20200122-1805
This change makes AbstractCSSSWTEngineImpl.isStylable(Widget) able to handle disposed widgets by returning false instead of throwing an exception. Change-Id: If71c6c6bd5a5325934cce753121c241eb29c01aa Signed-off-by: Peter Billström <peter.billstrom@gmail.com>
-rw-r--r--bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/engine/AbstractCSSSWTEngineImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/engine/AbstractCSSSWTEngineImpl.java b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/engine/AbstractCSSSWTEngineImpl.java
index bd17cd54463..cb81d021c2d 100644
--- a/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/engine/AbstractCSSSWTEngineImpl.java
+++ b/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/engine/AbstractCSSSWTEngineImpl.java
@@ -113,7 +113,8 @@ public abstract class AbstractCSSSWTEngineImpl extends CSSEngineImpl {
*/
protected boolean isStylable(Widget widget) {
// allows widgets to be selectively excluded from styling
- return !Boolean.TRUE.equals(widget.getData("org.eclipse.e4.ui.css.disabled")); //$NON-NLS-1$
+ return !widget.isDisposed()
+ && !Boolean.TRUE.equals(widget.getData("org.eclipse.e4.ui.css.disabled")); //$NON-NLS-1$
}
@Override

Back to the top