Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-01-22 14:20:00 -0500
committerEugene Tarassov2013-01-22 14:20:00 -0500
commit5fd7d435d485be5215730a0169906286a1f679ee (patch)
tree3474f4f25f6cbee6560797e7f6c6a3432c0ab94b /plugins
parentd4f39ecc4aaf48c50dd72ab71d162caef4a69152 (diff)
downloadorg.eclipse.tcf-5fd7d435d485be5215730a0169906286a1f679ee.tar.gz
org.eclipse.tcf-5fd7d435d485be5215730a0169906286a1f679ee.tar.xz
org.eclipse.tcf-5fd7d435d485be5215730a0169906286a1f679ee.zip
TCF Debugger: fixed intermittent NPE in isEnabled method of command handlers
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
index e0fac8945..d4e89b1dc 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/AbstractActionDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2009, 2013 Wind River Systems, Inc. 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
@@ -20,6 +20,7 @@ import org.eclipse.core.commands.IHandlerListener;
import org.eclipse.core.commands.common.EventManager;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Event;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
@@ -132,7 +133,9 @@ public abstract class AbstractActionDelegate extends EventManager implements
if (window == null) return false;
part = window.getActivePage().getActivePart();
if (part == null) return false;
- selection = part.getSite().getSelectionProvider().getSelection();
+ ISelectionProvider selection_provider = part.getSite().getSelectionProvider();
+ if (selection_provider == null) return false;
+ selection = selection_provider.getSelection();
if (selection == null) return false;
selectionChanged();
return enabled;

Back to the top