fix NPE in create ns declaration fix
authorpeter <peter@jetbrains.com>
Wed, 11 Jan 2012 13:03:38 +0000 (14:03 +0100)
committerpeter <peter@jetbrains.com>
Wed, 11 Jan 2012 13:57:52 +0000 (14:57 +0100)
xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/CreateNSDeclarationIntentionFix.java

index 00338d3219e240e1d2a804456febd612dad5441b..2fd21d165ffede31520e751e70661f3a7bd9abe2 100644 (file)
@@ -194,6 +194,7 @@ public class CreateNSDeclarationIntentionFix implements HintAction, LocalQuickFi
   }
 
   public boolean showHint(final Editor editor) {
+    if (myToken == null) return false;
     XmlToken token = (XmlToken)myToken.retrieve();
     if (token == null) return false;
     if (!XmlSettings.getInstance().SHOW_XML_ADD_IMPORT_HINTS || myNamespacePrefix.length() == 0) {