EA-32632 - RE: DocumentCommitThread.commitSynchronously idea/112.582
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 25 Jan 2012 15:41:28 +0000 (19:41 +0400)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 25 Jan 2012 15:49:10 +0000 (19:49 +0400)
platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateManagerImpl.java

index 6395e06cf360fefefc838588334a025c810061cb..6aade3c1d0b36ed67613f32d193101db31851b6e 100644 (file)
@@ -72,6 +72,7 @@ public class TemplateManagerImpl extends TemplateManager implements ProjectCompo
       public void editorReleased(EditorFactoryEvent event) {
         Editor editor = event.getEditor();
         if (editor.getProject() != null && editor.getProject() != myProject) return;
+        if (myProject.isDisposed() || !myProject.isOpen()) return;
         TemplateState tState = getTemplateState(editor);
         if (tState != null) {
           tState.gotoEnd();