From 2e675e2939d8b966f882146ea3a502aa7f23eb7f Mon Sep 17 00:00:00 2001 From: Artem Khvastunov Date: Fri, 4 May 2018 12:24:35 +0200 Subject: [PATCH] fix NPE #19 --- src/idea/plugin/psiviewer/view/EditorPsiElementHighlighter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idea/plugin/psiviewer/view/EditorPsiElementHighlighter.java b/src/idea/plugin/psiviewer/view/EditorPsiElementHighlighter.java index 1b82737..70a78e9 100755 --- a/src/idea/plugin/psiviewer/view/EditorPsiElementHighlighter.java +++ b/src/idea/plugin/psiviewer/view/EditorPsiElementHighlighter.java @@ -46,7 +46,7 @@ public void run() { } }); - if (psiElement.getReference() != null) { + if (psiElement != null && psiElement.getReference() != null) { ApplicationManager.getApplication().runReadAction(new Runnable() { public void run() { applyReference(psiElement.getReference());