diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-03-07 19:55:40 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-03-07 19:55:40 +0100 |
commit | e904f814c83636903bf9de37078d141f3f51c340 (patch) | |
tree | aa9fd2124fcc74f392a8fc93ff458db73805c08e /modules/mono/csharp_script.cpp | |
parent | 5f079e2ef90dfc76887814e10b6ed16aa8fe88d9 (diff) | |
download | redot-engine-e904f814c83636903bf9de37078d141f3f51c340.tar.gz |
Mono: Fix crash when re-using script binding after domain reloading
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 47be3a9959..0ccf1d635b 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -985,6 +985,13 @@ bool CSharpLanguage::debug_break(const String &p_error, bool p_allow_continue) { } } +void CSharpLanguage::_uninitialize_script_bindings() { + for (Map<Object *, CSharpScriptBinding>::Element *E = script_bindings.front(); E; E = E->next()) { + CSharpScriptBinding &script_binding = E->value(); + script_binding.inited = false; + } +} + void CSharpLanguage::set_language_index(int p_idx) { ERR_FAIL_COND(lang_idx != -1); |