diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 8 | ||||
-rw-r--r-- | main/tests/test_oa_hash_map.cpp | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 7383294167..f6902ffe23 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1230,6 +1230,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { register_driver_types(); + // This loads global classes, so it must happen before custom loaders and savers are registered ScriptServer::init_languages(); MAIN_PRINT("Main: Load Translations"); @@ -1489,6 +1490,9 @@ bool Main::start() { } #endif + ResourceLoader::add_custom_loaders(); + ResourceSaver::add_custom_savers(); + if (!project_manager && !editor) { // game if (game_path != "" || script != "") { //autoload @@ -1961,11 +1965,13 @@ void Main::force_redraw() { * so that the engine closes cleanly without leaking memory or crashing. * The order matters as some of those steps are linked with each other. */ - void Main::cleanup() { ERR_FAIL_COND(!_start_success); + ResourceLoader::remove_custom_loaders(); + ResourceSaver::remove_custom_savers(); + message_queue->flush(); memdelete(message_queue); diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp index deaba285cf..984a661aaa 100644 --- a/main/tests/test_oa_hash_map.cpp +++ b/main/tests/test_oa_hash_map.cpp @@ -95,7 +95,7 @@ MainLoop *test() { // stress test / test for issue #22928 { OAHashMap<int, int> map; - int dummy; + int dummy = 0; const int N = 1000; uint32_t *keys = new uint32_t[N]; |