Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2013-08-13 16:07:23 +0000
committerGerrit Code Review @ Eclipse.org2013-08-13 17:35:02 +0000
commitd6ac79cc309f73a4e1611a90d999b3036a375427 (patch)
tree2fe0459be9dfe5159aa399770c8ea4932363a32f
parent363bf2ff71b457f076f3744b0a0eca27936ba50e (diff)
downloadeclipse.platform.ui-d6ac79cc309f73a4e1611a90d999b3036a375427.tar.gz
eclipse.platform.ui-d6ac79cc309f73a4e1611a90d999b3036a375427.tar.xz
eclipse.platform.ui-d6ac79cc309f73a4e1611a90d999b3036a375427.zip
Bug 414976: NPE in
org.eclipse.e4.core.commands.internal.HandlerServiceHandler.isEnabled() Added guard against HandlerServiceImpl.peek() returning null. Checked other uses, to ensure they were safe, too. Change-Id: I1ce35c47f32e0c89ddf7e81a66253dd1d89aeb3f
-rw-r--r--bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceHandler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceHandler.java b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceHandler.java
index ca6253f039a..9a098588cdf 100644
--- a/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceHandler.java
+++ b/bundles/org.eclipse.e4.core.commands/src/org/eclipse/e4/core/commands/internal/HandlerServiceHandler.java
@@ -42,7 +42,7 @@ public class HandlerServiceHandler extends AbstractHandler {
public boolean isEnabled() {
ExecutionContexts contexts = HandlerServiceImpl.peek();
// setEnabled(contexts);
- IEclipseContext executionContext = contexts.context; // getExecutionContext(contexts);
+ IEclipseContext executionContext = contexts != null ? contexts.context : null; // getExecutionContext(contexts);
if (executionContext == null) {
return super.isEnabled();
}

Back to the top