From 12ea0b735aeafa7760ad30d0ad772b4cc9380aa6 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 17 Mar 2022 23:11:53 +0100 Subject: [PATCH] Add ERR_FAIL_INDEX macro to ActionBarProfile's remove_action_bar. --- .../profiles/actionbar/action_bar_profile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/entity_spell_system/profiles/actionbar/action_bar_profile.cpp b/modules/entity_spell_system/profiles/actionbar/action_bar_profile.cpp index a3a2c4b78..bcc902626 100644 --- a/modules/entity_spell_system/profiles/actionbar/action_bar_profile.cpp +++ b/modules/entity_spell_system/profiles/actionbar/action_bar_profile.cpp @@ -97,6 +97,8 @@ Ref 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);