summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDaniel Rolka2013-12-05 09:37:43 (EST)
committer Daniel Rolka2013-12-05 09:37:43 (EST)
commitbd4f8f4681b4634eef1dc41720d902b0d17bc105 (patch)
treed63748de460d0ea6f6d3d46839f5f52dd769c6a0
parentba0a149ee7a195a07c6b169f6d5ee6cdfcbcb022 (diff)
downloadeclipse.platform.ui-bd4f8f4681b4634eef1dc41720d902b0d17bc105.zip
eclipse.platform.ui-bd4f8f4681b4634eef1dc41720d902b0d17bc105.tar.gz
eclipse.platform.ui-bd4f8f4681b4634eef1dc41720d902b0d17bc105.tar.bz2
Bug 417399 - [Perspective] NPE during closing workspace with perspectiverefs/changes/57/16557/5
opened with the '-perspective' option Change-Id: I8749132d9a54092e8e282155817950004e323ce8 Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
index b620738..8da0a94 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
@@ -629,6 +629,12 @@ public class PartRenderingEngine implements IPresentationEngine {
}
}
+ // We check the widget again since it could be created by some UI event.
+ // See Bug 417399
+ if (element.getWidget() != null) {
+ return safeCreateGui(element, parentWidget, parentContext);
+ }
+
// Create a control appropriate to the part
Object newWidget = createWidget(element, parentWidget);