Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Overbey2012-05-03 16:32:28 +0000
committerJeffrey Overbey2012-05-03 16:32:28 +0000
commit471df488d26abf2509da38d1635e9a909f02b47a (patch)
treebe4b993e467d807534ba4d7ef60f27475bf80a33
parent2fbbac0f4682b11736b551879df3f74fb5e7ed81 (diff)
downloadorg.eclipse.photran-471df488d26abf2509da38d1635e9a909f02b47a.tar.gz
org.eclipse.photran-471df488d26abf2509da38d1635e9a909f02b47a.tar.xz
org.eclipse.photran-471df488d26abf2509da38d1635e9a909f02b47a.zip
Fixed 4.2M6 NPE in DeclarationView#startObserving
-rw-r--r--org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/declaration/DeclarationView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/declaration/DeclarationView.java b/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/declaration/DeclarationView.java
index a4743cbb..12e09bd1 100644
--- a/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/declaration/DeclarationView.java
+++ b/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/declaration/DeclarationView.java
@@ -263,6 +263,9 @@ public class DeclarationView extends ViewPart
tasks.addASTTask(this);
tasks.addVPGTask(this);
+ if (getSite() == null || getSite().getService(IPartService.class) == null)
+ return null;
+
((IPartService)getSite().getService(IPartService.class)).addPartListener(new IPartListener2()
{
public void partActivated(IWorkbenchPartReference partRef)

Back to the top