aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2014-02-11 09:54:09 (EST)
committerPaul Elder2014-02-11 12:11:51 (EST)
commit1a26077d10229de80817654c07e49a298085bf75 (patch)
tree6d49763a2b871acc4c75f29c05587f3bf2602a3b
parent4564213c1553168a5a81fc0bb160d119880cb2d7 (diff)
downloadeclipse.platform.ui-1a26077d10229de80817654c07e49a298085bf75.zip
eclipse.platform.ui-1a26077d10229de80817654c07e49a298085bf75.tar.gz
eclipse.platform.ui-1a26077d10229de80817654c07e49a298085bf75.tar.bz2
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 703bb82..7ab5c2c 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);
}