From ce596aebebf6a0dd6c63e9f7f7c68a75827930e2 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 1 Mar 2011 12:51:50 +0100 Subject: [PATCH] correct the assertion --- .../xml/highlighting/DomElementProblemDescriptorImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xml/dom-impl/src/com/intellij/util/xml/highlighting/DomElementProblemDescriptorImpl.java b/xml/dom-impl/src/com/intellij/util/xml/highlighting/DomElementProblemDescriptorImpl.java index 479ccd79ef66..9dd85e823946 100644 --- a/xml/dom-impl/src/com/intellij/util/xml/highlighting/DomElementProblemDescriptorImpl.java +++ b/xml/dom-impl/src/com/intellij/util/xml/highlighting/DomElementProblemDescriptorImpl.java @@ -137,7 +137,10 @@ public class DomElementProblemDescriptorImpl implements DomElementProblemDescrip if (myPair == null) { myPair = computeProblemRange(); } - assert myPair.second.isValid(); + PsiElement element = myPair.second; + if (element != null) { + assert element.isValid(); + } return myPair; }