From 3736d0af3b5f0682a337f768aa13dd92535243c8 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 23 Nov 2012 21:50:21 +0100 Subject: [PATCH] [^ann] EA-41205 handle outdated template state (cherry-picked from 467fda4) --- .../codeInsight/template/macro/BaseCompleteMacro.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/template/macro/BaseCompleteMacro.java b/platform/lang-impl/src/com/intellij/codeInsight/template/macro/BaseCompleteMacro.java index 2fe96bca2a5a..2a491361f27a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/template/macro/BaseCompleteMacro.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/template/macro/BaseCompleteMacro.java @@ -137,6 +137,10 @@ public abstract class BaseCompleteMacro extends Macro { } final Project project = myContext.getProject(); + if (project == null) { + return; + } + Runnable runnable = new Runnable() { @Override public void run() {