You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
C#: Fix crash with DisposablesTracker_OnGodotShuttingDown
This commit is contained in:
@@ -139,6 +139,10 @@ void CSharpLanguage::finalize() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gdmono && gdmono->is_runtime_initialized() && GDMonoCache::godot_api_cache_updated) {
|
||||||
|
GDMonoCache::managed_callbacks.DisposablesTracker_OnGodotShuttingDown();
|
||||||
|
}
|
||||||
|
|
||||||
finalizing = true;
|
finalizing = true;
|
||||||
|
|
||||||
// Make sure all script binding gchandles are released before finalizing GDMono
|
// Make sure all script binding gchandles are released before finalizing GDMono
|
||||||
|
|||||||
@@ -534,12 +534,6 @@ GDMono::GDMono() {
|
|||||||
GDMono::~GDMono() {
|
GDMono::~GDMono() {
|
||||||
finalizing_scripts_domain = true;
|
finalizing_scripts_domain = true;
|
||||||
|
|
||||||
if (is_runtime_initialized()) {
|
|
||||||
if (GDMonoCache::godot_api_cache_updated) {
|
|
||||||
GDMonoCache::managed_callbacks.DisposablesTracker_OnGodotShuttingDown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hostfxr_dll_handle) {
|
if (hostfxr_dll_handle) {
|
||||||
OS::get_singleton()->close_dynamic_library(hostfxr_dll_handle);
|
OS::get_singleton()->close_dynamic_library(hostfxr_dll_handle);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user