IDEA-194957 NPE on closing Project in IntelliJ IDEA

This commit is contained in:
Rustam Vishnyakov
2018-07-19 18:39:30 +03:00
parent 9bc5f361df
commit 862b62df42
@@ -946,7 +946,9 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
myEditorComponent.removeMouseMotionListener(myMouseMotionListener);
myGutterComponent.removeMouseMotionListener(myMouseMotionListener);
CodeStyleSettingsManager.getInstance(myProject).removeListener(this);
if (myProject == null || !myProject.isDisposed()) {
CodeStyleSettingsManager.getInstance(myProject).removeListener(this);
}
if (myBulkUpdateListener != null) {
((DocumentImpl)myDocument).removeInternalBulkModeListener(myBulkUpdateListener);