diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 92b07dc83b..91ff222f57 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1633,6 +1633,8 @@ bool Main::start() { GLOBAL_DEF("mono/profiler/args", "log:calls,alloc,sample,output=output.mlpd"); GLOBAL_DEF("mono/profiler/enabled", false); GLOBAL_DEF("mono/unhandled_exception_policy", 0); + // From editor/csharp_project.cpp. + GLOBAL_DEF("mono/project/auto_update_project", true); #endif DocData doc; @@ -2319,8 +2321,8 @@ void Main::cleanup() { ResourceLoader::remove_custom_loaders(); ResourceSaver::remove_custom_savers(); + // Flush before uninitializing the scene, but delete the MessageQueue as late as possible. message_queue->flush(); - memdelete(message_queue); OS::get_singleton()->delete_main_loop(); @@ -2406,6 +2408,10 @@ void Main::cleanup() { OS::get_singleton()->set_restart_on_exit(false, List<String>()); //clear list (uses memory) } + // Now should be safe to delete MessageQueue (famous last words). + message_queue->flush(); + memdelete(message_queue); + unregister_core_driver_types(); unregister_core_types(); |