We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 337e5da + e516479 commit 7437b9aCopy full SHA for 7437b9a
main/main.cpp
@@ -4295,9 +4295,6 @@ void Main::cleanup(bool p_force) {
4295
if (globals) {
4296
memdelete(globals);
4297
}
4298
- if (engine) {
4299
- memdelete(engine);
4300
- }
4301
4302
if (OS::get_singleton()->is_restart_on_exit_set()) {
4303
//attempt to restart with arguments
@@ -4315,6 +4312,10 @@ void Main::cleanup(bool p_force) {
4315
4312
uninitialize_modules(MODULE_INITIALIZATION_LEVEL_CORE);
4316
4313
unregister_core_types();
4317
4314
+ if (engine) {
+ memdelete(engine);
+ }
4318
+
4319
OS::get_singleton()->benchmark_end_measure("Shutdown", "Total");
4320
OS::get_singleton()->benchmark_dump();
4321
0 commit comments