NPE diagnostics for http://ea.jetbrains.com/browser/ea_problems/19225
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Tue, 30 Mar 2010 06:16:52 +0000 (10:16 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Tue, 30 Mar 2010 06:16:52 +0000 (10:16 +0400)
xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java

index bd6455a0013fc9889ce184ef746489cea1a00241..1265ed40664f210f3481facf8655c4b88f0a006d 100644 (file)
@@ -45,6 +45,7 @@ public class XmlAttributeValueManipulator extends AbstractElementManipulator<Xml
     CheckUtil.checkWritable(element);
     final CompositeElement attrNode = (CompositeElement)element.getNode();
     final ASTNode valueNode = attrNode.findLeafElementAt(range.getStartOffset());
+    LOG.assertTrue(valueNode != null, "Leaf not found in " + attrNode + " at offset " + range.getStartOffset());
     final PsiElement elementToReplace = valueNode.getPsi();
 
     String text;