diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2023-10-31 20:52:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-31 20:52:27 +0100 |
commit | 6afd320984cf14198368cc6c53752813a02169e3 (patch) | |
tree | c05ba8cf64d7517ac738beec8f5bf1fae55b9800 /modules/mono/csharp_script.cpp | |
parent | 8fc215893af3ea54a8fbd001caee0ce968d206d9 (diff) | |
parent | d515fcc47afe2f1647120ef974b35cb56ff7bfc5 (diff) | |
download | redot-engine-6afd320984cf14198368cc6c53752813a02169e3.tar.gz |
Merge pull request #78157 from RedworkDE/net-shutting-down-abruptly
C#: Fix crash with `DisposablesTracker_OnGodotShuttingDown`
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 44bcd4cfe4..3cc32bff10 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -142,6 +142,10 @@ void CSharpLanguage::finalize() { return; } + if (gdmono && gdmono->is_runtime_initialized() && GDMonoCache::godot_api_cache_updated) { + GDMonoCache::managed_callbacks.DisposablesTracker_OnGodotShuttingDown(); + } + finalizing = true; // Make sure all script binding gchandles are released before finalizing GDMono |