summaryrefslogtreecommitdiffstats
path: root/core/extension
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2024-05-10 12:07:21 -0500
committerDavid Snopek <dsnopek@gmail.com>2024-05-10 13:17:36 -0500
commit14506a4282b6b9079280ec54f50f46ba041c0d10 (patch)
tree566585e6fc1bd30b155414cc87b7d476b295c691 /core/extension
parent2ba22d1554ded08094e3869a83bd87487266ad38 (diff)
downloadredot-engine-14506a4282b6b9079280ec54f50f46ba041c0d10.tar.gz
GDExtension: Prevent crash during shutdown as singletons are deleted
Diffstat (limited to 'core/extension')
-rw-r--r--core/extension/gdextension_manager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/extension/gdextension_manager.cpp b/core/extension/gdextension_manager.cpp
index a4d032f22f..1ee9de0776 100644
--- a/core/extension/gdextension_manager.cpp
+++ b/core/extension/gdextension_manager.cpp
@@ -295,6 +295,9 @@ GDExtensionManager::GDExtensionManager() {
}
GDExtensionManager::~GDExtensionManager() {
+ if (singleton == this) {
+ singleton = nullptr;
+ }
#ifndef DISABLE_DEPRECATED
GDExtensionCompatHashes::finalize();
#endif