Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-04-06 18:15:54 +0000
committerMichael Valenta2005-04-06 18:15:54 +0000
commit02c17a6242fe679914e05f5bc42f0f0a7ecb48e7 (patch)
tree752e493da1e5e0c885e48334a6bd52881a9f1f4e /bundles
parent09aa1421a93847470bfd7ac0c0ce886870246975 (diff)
downloadeclipse.platform.team-02c17a6242fe679914e05f5bc42f0f0a7ecb48e7.tar.gz
eclipse.platform.team-02c17a6242fe679914e05f5bc42f0f0a7ecb48e7.tar.xz
eclipse.platform.team-02c17a6242fe679914e05f5bc42f0f0a7ecb48e7.zip
Bug 90338 NullPointerException in TeamAction.getTargetPart
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
index a58c65453..389082ae6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
@@ -368,11 +368,14 @@ public abstract class TeamAction extends ActionDelegate implements IObjectAction
* @return IWorkbenchPart
*/
protected IWorkbenchPart getTargetPart() {
- if(targetPart == null) {
- IWorkbenchPage page = TeamUIPlugin.getActivePage();
- targetPart = page.getActivePart();
- }
- return targetPart;
+ if(targetPart == null) {
+ IWorkbenchPage page = TeamUIPlugin.getActivePage();
+ if (page != null) {
+ targetPart = page.getActivePart();
+ }
+ }
+ return targetPart;
+
}
/**

Back to the top