Browse Source

Merge pull request #33994 from nekomatata/start-fail-errors

Flush remaining messages before quitting the game when loading fails
Rémi Verschelde 5 years ago
parent
commit
52e3993eb0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      main/main.cpp

+ 5 - 0
main/main.cpp

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