Skip to content

Commit da643d4

Browse files
committed
catch npe issue with plugin enabled check, for global twig navigation #574
1 parent 1e687f4 commit da643d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fr/adrienbrault/idea/symfony2plugin/templating/PhpTemplateGlobalStringGoToDeclarationHandler.java

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public class PhpTemplateGlobalStringGoToDeclarationHandler implements GotoDeclar
2323
@Override
2424
public PsiElement[] getGotoDeclarationTargets(PsiElement psiElement, int i, Editor editor) {
2525

26+
if(!Symfony2ProjectComponent.isEnabled(psiElement)) {
27+
return null;
28+
}
29+
2630
if(!(psiElement.getContainingFile() instanceof PhpFile) || !(psiElement.getContext() instanceof StringLiteralExpression)) {
2731
return new PsiElement[0];
2832
}

0 commit comments

Comments
 (0)