Răsfoiți Sursa

Fixed crash resulting from closing the last editor in the IDE not setting current editor to NULL

Ivan Safrin 12 ani în urmă
părinte
comite
980ea35b76
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      IDE/Contents/Source/PolycodeIDEApp.cpp

+ 2 - 0
IDE/Contents/Source/PolycodeIDEApp.cpp

@@ -267,6 +267,8 @@ bool PolycodeIDEApp::removeEditor(PolycodeEditor *editor) {
 		if(editorManager->openEditors.size() > 0) {
 			editorManager->setCurrentEditor(editorManager->openEditors[0]);
 			frame->showEditor(editorManager->openEditors[0]);
+		} else {
+			editorManager->setCurrentEditor(NULL);
 		}
 	}
 	return false;