Просмотр исходного кода

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

Ivan Safrin 12 лет назад
Родитель
Сommit
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;