diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 8f870368ce88..518b644af2eb 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(); } }