瀏覽代碼

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'.

jpcerrone 2 年之前
父節點
當前提交
8ce8216d17
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/gdscript/gdscript.cpp

+ 1 - 1
modules/gdscript/gdscript.cpp

@@ -1542,7 +1542,7 @@ GDScript::~GDScript() {
 	{
 	{
 		MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
 		MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
 
 
-		GDScriptLanguage::get_singleton()->script_list.remove(&script_list);
+		script_list.remove_from_list();
 	}
 	}
 }
 }