Sfoglia il codice sorgente

Fixed copy/paste crashing the IDE because of unremoved event listeners

Ivan Safrin 12 anni fa
parent
commit
a0e9d63817
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      IDE/Contents/Source/PolycodeEditor.cpp

+ 2 - 1
IDE/Contents/Source/PolycodeEditor.cpp

@@ -97,7 +97,8 @@ void PolycodeEditor::Resize(int x, int y) {
 }
 
 PolycodeEditor::~PolycodeEditor() {
-	
+	Core *core = CoreServices::getInstance()->getCore();
+	core->removeAllHandlersForListener(this);
 }