Преглед изворни кода

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

Ivan Safrin пре 12 година
родитељ
комит
980ea35b76
1 измењених фајлова са 2 додато и 0 уклоњено
  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;