Add ERR_FAIL_INDEX macro to ActionBarProfile's remove_action_bar.

This commit is contained in:
Relintai 2022-03-17 23:11:53 +01:00
parent 8fbdcd18f9
commit 12ea0b735a

View File

@ -97,6 +97,8 @@ Ref<ActionBarEntry> ActionBarProfile::get_action_bar(int index) {
}
void ActionBarProfile::remove_action_bar(const int index) {
ERR_FAIL_INDEX(index, _action_bars.size());
_action_bars.get(index)->set_owner(NULL);
_action_bars.remove(index);