From 16dc890fce88ec9179e34121783069e9a62ecba8 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 28 Jan 2016 18:00:32 +0300 Subject: [PATCH] EA-78416 - NPE: ResourceBundlePropertyStructureViewElement$.getTextAttributes --- .../ResourceBundlePropertyStructureViewElement.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java index 27c44daba8ff..51cfd24271fc 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/editor/ResourceBundlePropertyStructureViewElement.java @@ -127,9 +127,11 @@ public class ResourceBundlePropertyStructureViewElement implements StructureView if (getProperty().getPsiElement().isValid()) { myInspectionPassInfo = ResourceBundleEditorInspectionPass.inspect(getProperty().getKey(), getProperty().getPropertiesFile().getResourceBundle()); - TextAttributes highlightingAttributes = myInspectionPassInfo.getTextAttributes(colorsScheme); - if (highlightingAttributes != null) { - return TextAttributes.merge(baseAttrs, highlightingAttributes); + if (myInspectionPassInfo != null) { + TextAttributes highlightingAttributes = myInspectionPassInfo.getTextAttributes(colorsScheme); + if (highlightingAttributes != null) { + return TextAttributes.merge(baseAttrs, highlightingAttributes); + } } } return baseAttrs;