summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMariano Suligoy <marianognu.easyrpg@gmail.com>2018-01-14 09:50:52 -0300
committerRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-16 22:27:40 +0100
commitff59c562f745de957e8395fc02af1e5d7377a302 (patch)
tree628e2d18d8a6e1833a70833e58b0711f0114730c /main
parentfb0cd802c4de45469bda9984e131da61da1fdd46 (diff)
Fix crash when closing the editor
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp6
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();