NPE fixed

This commit is contained in:
Andrey Breslav
2011-10-05 17:09:01 +04:00
parent 737c1581ca
commit d58fa2184b
@@ -38,7 +38,9 @@ class JetSimpleNameReference extends JetPsiReference {
@Override
public TextRange getRangeInElement() {
return new TextRange(0, getElement().getTextLength());
PsiElement element = getElement();
if (element == null) return null;
return new TextRange(0, element.getTextLength());
}
@NotNull