瀏覽代碼

Flush remaining messages before quitting the game when loading fails

This change allows error messages to be printed in the editor debugger when the game fails on load, instead of displaying them in the console terminal only.
PouleyKetchoupp 5 年之前
父節點
當前提交
85a955fc56
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      main/main.cpp

+ 5 - 0
main/main.cpp

@@ -2090,6 +2090,11 @@ void Main::cleanup() {
 
 
 	ERR_FAIL_COND(!_start_success);
 	ERR_FAIL_COND(!_start_success);
 
 
+	if (script_debugger) {
+		// Flush any remaining messages
+		script_debugger->idle_poll();
+	}
+
 	ResourceLoader::remove_custom_loaders();
 	ResourceLoader::remove_custom_loaders();
 	ResourceSaver::remove_custom_savers();
 	ResourceSaver::remove_custom_savers();