Fix crash when closing the editor

This commit is contained in:
Mariano Suligoy 2018-01-14 09:50:52 -03:00 committed by Rémi Verschelde
parent fb0cd802c4
commit ff59c562f7
1 changed files with 3 additions and 3 deletions

View File

@ -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();