InsertOverwritePanel: don't leak editor
[idea/community.git] / platform / platform-impl / src / com / intellij / openapi / wm / impl / status / InsertOverwritePanel.java
index 44257ee463c0547d5cf8abf209691d93be509e5a..9518a7dfe5845907644158f8690c6499ce9ecadb 100644 (file)
@@ -102,6 +102,7 @@ public class InsertOverwritePanel extends EditorBasedWidget implements StatusBar
   private void switchEditor() {
     if (myOldEditor != null) {
       myOldEditor.removePropertyChangeListener(this);
+      myOldEditor = null;
     }
     EditorEx editor = (EditorEx)getEditor();
     if (editor != null) {