aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2013-08-13 12:07:23 (EDT)
committerGerrit Code Review @ Eclipse.org2013-08-13 13:35:02 (EDT)
commitd6ac79cc309f73a4e1611a90d999b3036a375427 (patch)
tree2fe0459be9dfe5159aa399770c8ea4932363a32f
parent363bf2ff71b457f076f3744b0a0eca27936ba50e (diff)
downloadeclipse.platform.ui-d6ac79cc309f73a4e1611a90d999b3036a375427.zip
eclipse.platform.ui-d6ac79cc309f73a4e1611a90d999b3036a375427.tar.gz
eclipse.platform.ui-d6ac79cc309f73a4e1611a90d999b3036a375427.tar.bz2
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 ca6253f..9a09858 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();
}