Skip to content

Commit

Permalink
Fix errors destroying script with static variables
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
jpcerrone committed Jun 21, 2023
1 parent ee41b20 commit 8913778
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/gdscript/gdscript.cpp
Expand Up @@ -1538,11 +1538,9 @@ GDScript::~GDScript() {
}
}
}

{
MutexLock lock(GDScriptLanguage::get_singleton()->mutex);

GDScriptLanguage::get_singleton()->script_list.remove(&script_list);
script_list.remove_from_list();
}
}

Expand Down

0 comments on commit 8913778

Please sign in to comment.