aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-04-03 16:26:26 (EDT)
committerOleg Besedin2012-04-03 16:39:44 (EDT)
commit2ab7f63d9dfa46b6d72c6d7a1668c400bf5fc517 (patch)
treecf3a39a21baf7b776d835ccb1e72a7b70d12ce7a
parent075265529ce2559be527601b10c38a51144b9a45 (diff)
downloadeclipse.platform.ui-2ab7f63d9dfa46b6d72c6d7a1668c400bf5fc517.zip
eclipse.platform.ui-2ab7f63d9dfa46b6d72c6d7a1668c400bf5fc517.tar.gz
eclipse.platform.ui-2ab7f63d9dfa46b6d72c6d7a1668c400bf5fc517.tar.bz2
Bug 204192 - [WorkbenchParts] NullPointerException in
WorkbenchWindow.hardClose
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java2
-rwxr-xr-xbundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index be5971f..8c8af4e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -1131,6 +1131,8 @@ public class WorkbenchWindow implements IWorkbenchWindow {
* Assumes that busy cursor is active.
*/
private boolean busyClose(boolean remove) {
+ if (closing)
+ return false;
// Whether the window was actually closed or not
boolean windowClosed = false;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java
index b065fef..690af33 100755
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java
@@ -158,6 +158,8 @@ public class WorkbenchMenuService implements IMenuService {
Object contribution;
if ((contribution = factoriesToContributions.remove(factory)) != null) {
MApplication app = e4Context.get(MApplication.class);
+ if (app == null)
+ return;
if (contribution instanceof MMenuContribution) {
app.getMenuContributions().remove(contribution);
} else if (contribution instanceof MToolBarContribution) {