From a9ab3b87cea810fde05f296444545a0b821c139b Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Tue, 18 Oct 2011 11:45:32 +0400 Subject: [PATCH] NPE fixed --- .../org/jetbrains/jet/plugin/annotations/JetPsiChecker.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/jet/plugin/annotations/JetPsiChecker.java b/idea/src/org/jetbrains/jet/plugin/annotations/JetPsiChecker.java index 85c004ef2de..95962f451d8 100644 --- a/idea/src/org/jetbrains/jet/plugin/annotations/JetPsiChecker.java +++ b/idea/src/org/jetbrains/jet/plugin/annotations/JetPsiChecker.java @@ -136,7 +136,10 @@ public class JetPsiChecker implements Annotator { @Override public void visitProperty(JetProperty property) { DeclarationDescriptor declarationDescriptor = bindingContext.get(DECLARATION_TO_DESCRIPTOR, property); - markVariableAsWrappedIfNeeded(property.getNameIdentifier().getNode(), declarationDescriptor); + PsiElement nameIdentifier = property.getNameIdentifier(); + if (nameIdentifier != null) { + markVariableAsWrappedIfNeeded(nameIdentifier.getNode(), declarationDescriptor); + } super.visitProperty(property); }