diff options
-rw-r--r-- | main/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp index 0b231b9d30..be334fac48 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1822,6 +1822,9 @@ void Main::cleanup() { ERR_FAIL_COND(!_start_success); + message_queue->flush(); + memdelete(message_queue); + if (script_debugger) { if (use_debug_profiler) { script_debugger->profiling_end(); @@ -1879,9 +1882,6 @@ void Main::cleanup() { if (engine) memdelete(engine); - message_queue->flush(); - memdelete(message_queue); - unregister_core_driver_types(); unregister_core_types(); |