Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2014-02-11 14:54:09 +0000
committerPaul Elder2014-02-11 17:11:51 +0000
commit1a26077d10229de80817654c07e49a298085bf75 (patch)
tree6d49763a2b871acc4c75f29c05587f3bf2602a3b
parent4564213c1553168a5a81fc0bb160d119880cb2d7 (diff)
downloadeclipse.platform.ui-1a26077d10229de80817654c07e49a298085bf75.tar.gz
eclipse.platform.ui-1a26077d10229de80817654c07e49a298085bf75.tar.xz
eclipse.platform.ui-1a26077d10229de80817654c07e49a298085bf75.zip
Bug 398433: [Contexts] NullPointerException inR4_3_2M20140221-1700M20140212-0800
WorkbenchPage.getViewStack() Add NPE guard. Back-port: bug 427924 Change-Id: Ifa7f12c714e52045dd326b045fef70b6665d5faf
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
index 703bb82453d..7ab5c2c05c5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -4309,7 +4309,8 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
for (Object child : parent.getChildren()) {
MPart siblingPart = child instanceof MPart ? (MPart) child
: (MPart) ((MPlaceholder) child).getRef();
- Object siblingObject = siblingPart.getObject();
+ // Bug 398433 - guard against NPE
+ Object siblingObject = siblingPart != null ? siblingPart.getObject() : null;
if (siblingObject instanceof CompatibilityView) {
stack.add((CompatibilityView) siblingObject);
}

Back to the top