summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-22 21:39:01 +0100
committerGitHub <noreply@github.com>2021-02-22 21:39:01 +0100
commit88ee248db01851e29469948eee2f7e0944ac1714 (patch)
tree6017c6d4e3850eff53db47f778c37682b25edf66 /main
parente1e52b3736c34ba48cbcb3c62c967c035f5a2818 (diff)
parent23907e6f193636c4907d0ccdb9a886fff63ab275 (diff)
Merge pull request #46307 from RandomShaper/fix_crash_mono_glue
Make glue generation shutdown more graceful
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp6
-rw-r--r--main/main.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index ce9d8342c2..71dd3cf1ad 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2576,8 +2576,10 @@ 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);
+void Main::cleanup(bool p_force) {
+ if (!p_force) {
+ ERR_FAIL_COND(!_start_success);
+ }
EngineDebugger::deinitialize();
diff --git a/main/main.h b/main/main.h
index 9e606c188d..f4fff6b97e 100644
--- a/main/main.h
+++ b/main/main.h
@@ -59,7 +59,7 @@ public:
static bool is_iterating();
- static void cleanup();
+ static void cleanup(bool p_force = false);
};
// Test main override is for the testing behaviour.