diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2018-10-25 17:33:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 17:33:28 +0200 |
commit | dbaa22329761ce7a4d8bab291871b5b5ba359cbe (patch) | |
tree | f3fb6214d83fdd974d9613bfe1eb1a533bed56f1 /modules/mono/csharp_script.cpp | |
parent | 3f23b2ecf4b2a7ff1c234cdc46d1c38409dda75a (diff) | |
parent | b42f7b7fae627de8db4bef5bc036e6b29a1aab04 (diff) | |
download | redot-engine-dbaa22329761ce7a4d8bab291871b5b5ba359cbe.tar.gz |
Merge pull request #23282 from neikeq/issue-23249
C#: Fix crash when disposing Reference on domain finalize
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 5160d42367..6b3dc01306 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1407,6 +1407,8 @@ bool CSharpInstance::_unreference_owner_unsafe() { if (!unsafe_referenced) return false; // Already unreferenced + unsafe_referenced = false; + // Called from CSharpInstance::mono_object_disposed() or ~CSharpInstance() // Unsafe refcount decrement. The managed instance also counts as a reference. |