IDEA-173559 NPE at com.intellij.util.xml.impl.DomTemplateRunnerImpl.runTemplate

This commit is contained in:
sergey.vasiliev
2017-05-29 15:42:47 +02:00
parent dd0138b390
commit 9cac0c8a9f
@@ -54,7 +54,7 @@ public class DomTemplateRunnerImpl extends DomTemplateRunner {
}
public <T extends DomElement> void runTemplate(final T t, final Editor editor, @Nullable final Template template, Map<String, String> predefinedVars) {
if (template != null) {
if (template != null && t != null) {
DomElement copy = t.createStableCopy();
PsiDocumentManager.getInstance(myProject).doPostponedOperationsAndUnblockDocument(editor.getDocument());
XmlTag tag = copy.getXmlTag();