diff options
author | Rafał Mikrut <mikrutrafal54@gmail.com> | 2020-01-14 20:17:48 +0100 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal54@gmail.com> | 2020-01-14 20:17:48 +0100 |
commit | 724f5f3178b917259e9a7d3f6ff84d4b8db5a3cb (patch) | |
tree | 27c32c86eb3bf115391080641b4722d91b9330d3 /scene/gui | |
parent | 56d8a2295de01eafb831112cac9710323f27fac2 (diff) |
Don't allow to use too big index in ItemList
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/item_list.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 2a812caf9a..526950dbb3 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -993,7 +993,7 @@ void ItemList::_notification(int p_what) { } //ensure_selected_visible needs to be checked before we draw the list. - if (ensure_selected_visible && current >= 0 && current <= items.size()) { + if (ensure_selected_visible && current >= 0 && current < items.size()) { Rect2 r = items[current].rect_cache; int from = scroll_bar->get_value(); |