From e9622fc5e6c46e16f84495227a02516912262d6f Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 19 Mar 2018 18:55:13 +0300 Subject: [PATCH] EA-109591 - assert: UpdateHighlightersUtil.createOrReuseHighlighterFor --- .../daemon/impl/UpdateHighlightersUtil.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/UpdateHighlightersUtil.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/UpdateHighlightersUtil.java index a3d4fd1e5d96..928b86922db5 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/UpdateHighlightersUtil.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/UpdateHighlightersUtil.java @@ -372,10 +372,12 @@ public class UpdateHighlightersUtil { markup.changeAttributesInBatch(highlighter, changeAttributes); } - boolean attributesSet = Comparing.equal(infoAttributes, highlighter.getTextAttributes()); - assert attributesSet : "Info: " + infoAttributes + - "; colorsScheme: " + (colorsScheme == null ? "[global]" : colorsScheme.getName()) + - "; highlighter:" + highlighter.getTextAttributes(); + if (infoAttributes != null) { + boolean attributesSet = Comparing.equal(infoAttributes, highlighter.getTextAttributes()); + assert attributesSet : "Info: " + infoAttributes + + "; colorsScheme: " + (colorsScheme == null ? "[global]" : colorsScheme.getName()) + + "; highlighter:" + highlighter.getTextAttributes(); + } } private static int getLayer(@NotNull HighlightInfo info, @NotNull SeverityRegistrar severityRegistrar) {