summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorRedworkDE <10944644+RedworkDE@users.noreply.github.com>2023-05-09 15:50:48 +0200
committerRedworkDE <10944644+RedworkDE@users.noreply.github.com>2023-05-09 18:40:56 +0200
commit8e7afec479b29bfe7f6d33ca9bce70c9d1abf7cf (patch)
tree04bf8cc8c930f47c5793811aed5483b0fd7ff3bb /main
parent668cf3c66f42989949399f36e9faa29426e37416 (diff)
downloadredot-engine-8e7afec479b29bfe7f6d33ca9bce70c9d1abf7cf.tar.gz
Fix various errors when running the unit tests
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 0a6c7d5f97..24673cda31 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -581,8 +581,6 @@ void Main::test_cleanup() {
TextServerManager::get_singleton()->get_interface(i)->cleanup();
}
- EngineDebugger::deinitialize();
-
ResourceLoader::remove_custom_loaders();
ResourceSaver::remove_custom_savers();
@@ -594,6 +592,7 @@ void Main::test_cleanup() {
GDExtensionManager::get_singleton()->deinitialize_extensions(GDExtension::INITIALIZATION_LEVEL_SCENE);
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SCENE);
+
unregister_platform_apis();
unregister_driver_types();
unregister_scene_types();
@@ -604,8 +603,12 @@ void Main::test_cleanup() {
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_SERVERS);
unregister_server_types();
+ EngineDebugger::deinitialize();
OS::get_singleton()->finalize();
+ if (packed_data) {
+ memdelete(packed_data);
+ }
if (translation_server) {
memdelete(translation_server);
}
@@ -621,16 +624,13 @@ void Main::test_cleanup() {
if (globals) {
memdelete(globals);
}
- if (packed_data) {
- memdelete(packed_data);
- }
if (engine) {
memdelete(engine);
}
unregister_core_driver_types();
- uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
unregister_core_extensions();
+ uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
unregister_core_types();
OS::get_singleton()->finalize_core();