aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2014-02-11 09:54:09 (EST)
committerPaul Elder2014-02-11 09:54:09 (EST)
commitbce7ea01cfb590965f44d702ae0a6f22fe2cc7e3 (patch)
tree0e18d24e397cab40f2888ebafe3bdb5f384a4cff
parent8d0d3deed727bd5a00b673478fcdfcc73a80466e (diff)
downloadeclipse.platform.ui-bce7ea01cfb590965f44d702ae0a6f22fe2cc7e3.zip
eclipse.platform.ui-bce7ea01cfb590965f44d702ae0a6f22fe2cc7e3.tar.gz
eclipse.platform.ui-bce7ea01cfb590965f44d702ae0a6f22fe2cc7e3.tar.bz2
Bug 398433: [Contexts] NullPointerException inI20140211-1100refs/changes/13/21813/1
WorkbenchPage.getViewStack() Add NPE guard. 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 4278b85..46e684a 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
@@ -4298,7 +4298,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);
}