summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2019-03-07 20:50:37 +0100
committerGitHub <noreply@github.com>2019-03-07 20:50:37 +0100
commit4c0b0a6bdd3c87220ab0d79ba647d5bdd843ce6c (patch)
tree937f0f33962d2ff838c64643f1eceed49f3d552e /modules/mono/csharp_script.cpp
parentd2be02f21e8a16b44af78e72f9910e4640c4e0b1 (diff)
parente904f814c83636903bf9de37078d141f3f51c340 (diff)
downloadredot-engine-4c0b0a6bdd3c87220ab0d79ba647d5bdd843ce6c.tar.gz
Merge pull request #26765 from neikeq/issue-25959
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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 9bede87f6b..200ab51c7c 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);