From 85a955fc5659f047dcc8fff6629f33a75dabaee9 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Fri, 29 Nov 2019 14:01:56 +0100 Subject: 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. --- main/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index 22a31d597e..e6fba3c7b4 100644 --- a/main/main.cpp +++ b/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(); -- cgit v1.2.3