From 8ce8216d174276a714e65dd4d407ce8d158ab21e Mon Sep 17 00:00:00 2001 From: jpcerrone Date: Wed, 21 Jun 2023 11:42:19 -0300 Subject: [PATCH] Fix errors destroying script with static variables Fixes #78376 After #78138 'script_list' is now cleared in 'GDScriptLanguage::finish' Because of that, we can safely remove the removal from that list that happens on 'GDScript::~GDScript'. --- modules/gdscript/gdscript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 8f870368ce8..518b644af2e 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1542,7 +1542,7 @@ GDScript::~GDScript() { { MutexLock lock(GDScriptLanguage::get_singleton()->mutex); - GDScriptLanguage::get_singleton()->script_list.remove(&script_list); + script_list.remove_from_list(); } }