mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 22:21:18 +00:00
fix crash on shutdown
This commit is contained in:
parent
2bdbdc4702
commit
a55b10a053
1 changed files with 6 additions and 5 deletions
|
|
@ -397,16 +397,17 @@ void Main::print_help(const char *p_binary) {
|
||||||
|
|
||||||
int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
|
int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
|
||||||
#ifdef TOOLS_ENABLED // templates can't run unit test tool
|
#ifdef TOOLS_ENABLED // templates can't run unit test tool
|
||||||
OS::get_singleton()->initialize();
|
|
||||||
StringName::setup();
|
|
||||||
for (int x = 0; x < argc; x++) {
|
for (int x = 0; x < argc; x++) {
|
||||||
if (strncmp(argv[x], "--test", 6) == 0) {
|
if (strncmp(argv[x], "--test", 6) == 0) {
|
||||||
tests_need_run = true;
|
tests_need_run = true;
|
||||||
return test_main(argc, argv);
|
OS::get_singleton()->initialize();
|
||||||
|
StringName::setup();
|
||||||
|
int status = test_main(argc, argv);
|
||||||
|
StringName::cleanup();
|
||||||
|
// TODO: fix OS::singleton cleanup
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StringName::cleanup();
|
|
||||||
OS::get_singleton()->finalize();
|
|
||||||
#endif
|
#endif
|
||||||
tests_need_run = false;
|
tests_need_run = false;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue