Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Overbey2008-07-14 19:37:37 +0000
committerJeffrey Overbey2008-07-14 19:37:37 +0000
commita1154759c7f2b7b2f44cd5477402d4662f2b2f3b (patch)
tree2b3f6ddb821bb09a54b34c8dff96da6fdee0abb3
parentc25f6228db5260b5d362cf4012c81a926c53672a (diff)
downloadorg.eclipse.photran-a1154759c7f2b7b2f44cd5477402d4662f2b2f3b.tar.gz
org.eclipse.photran-a1154759c7f2b7b2f44cd5477402d4662f2b2f3b.tar.xz
org.eclipse.photran-a1154759c7f2b7b2f44cd5477402d4662f2b2f3b.zip
Fixed NPE
-rw-r--r--org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/DeclarationView.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/DeclarationView.java b/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/DeclarationView.java
index 15ea791e..5f6e4ad9 100644
--- a/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/DeclarationView.java
+++ b/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/views/DeclarationView.java
@@ -288,9 +288,12 @@ public class DeclarationView extends ViewPart
*/
public synchronized boolean handle(ASTExecutableProgramNode ast, TokenList tokenList, DefinitionMap<Definition> defMap)
{
- String path = activeEditor.getIFile().getFullPath().toPortableString();
- activeAST.put(path, ast);
- activeTokenList.put(path, tokenList);
+ if (activeEditor != null)
+ {
+ String path = activeEditor.getIFile().getFullPath().toPortableString();
+ activeAST.put(path, ast);
+ activeTokenList.put(path, tokenList);
+ }
return true;
}

Back to the top