Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-08-20 13:29:08 +0000
committerDani Megert2014-08-20 13:29:08 +0000
commit97c309605ad816049d15943a33249beff3ff8bc7 (patch)
tree1f3824fc520ca0a76a87809dca9d9d04af6202ab /bundles/org.eclipse.team.cvs.ui
parent850aa9bddce2100af762ec1c09e52247eb923f27 (diff)
downloadeclipse.platform.team-97c309605ad816049d15943a33249beff3ff8bc7.tar.gz
eclipse.platform.team-97c309605ad816049d15943a33249beff3ff8bc7.tar.xz
eclipse.platform.team-97c309605ad816049d15943a33249beff3ff8bc7.zip
Fixed NPE hidden by catching Exception in Command.isEnabled()
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
index 12924b7bb..a2fd881a4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 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
@@ -177,7 +177,8 @@ abstract public class CVSAction extends TeamAction implements IEditorActionDeleg
// Since we have a text selection, we will assume that the target is the active editor.
// Look for the active editor and see it adapts to ResourceMapping or IResource.
// See bug 132176
- IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IWorkbenchPage activePage= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorPart part= activePage != null ? activePage.getActiveEditor() : null;
if (part != null) {
IEditorInput input = part.getEditorInput();
ResourceMapping mapping = Utils.getResourceMapping(input);

Back to the top