do not commit document if project is already closed (IDEA-79970)

This commit is contained in:
anna
2012-01-16 13:24:46 +01:00
parent c9f46f788f
commit 8554ed8cf2

View File

@@ -466,7 +466,9 @@ public abstract class InplaceRefactoring {
}
}
});
PsiDocumentManager.getInstance(myProject).commitDocument(topLevelEditor.getDocument());
if (!myProject.isDisposed() && myProject.isOpen()) {
PsiDocumentManager.getInstance(myProject).commitDocument(topLevelEditor.getDocument());
}
}
}, getCommandName(), null);
}