GDExtension: Prevent crash during shutdown as singletons are deleted

This commit is contained in:
David Snopek
2024-05-10 12:07:21 -05:00
parent 2ba22d1554
commit 14506a4282
4 changed files with 17 additions and 4 deletions

View File

@ -295,6 +295,9 @@ GDExtensionManager::GDExtensionManager() {
}
GDExtensionManager::~GDExtensionManager() {
if (singleton == this) {
singleton = nullptr;
}
#ifndef DISABLE_DEPRECATED
GDExtensionCompatHashes::finalize();
#endif