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; }