diff options
author | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-06-12 21:59:48 +0200 |
---|---|---|
committer | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-06-13 07:49:21 +0200 |
commit | d515fcc47afe2f1647120ef974b35cb56ff7bfc5 (patch) | |
tree | cbd176c8bb134b58c974907340731c38157098c0 /modules/mono/csharp_script.cpp | |
parent | a3c49ad2f0120f41789836a523698db0d4a9f0f2 (diff) | |
download | redot-engine-d515fcc47afe2f1647120ef974b35cb56ff7bfc5.tar.gz |
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 05595e7e45..e06440230b 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -139,6 +139,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 |