diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-14 21:03:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 21:03:25 +0100 |
commit | 57986208f30d02c9168641df80575a607a230286 (patch) | |
tree | 6a9411aab1e1807c4c591f6bc2cc356d9cb64ed2 | |
parent | 8f103b1b69b6a0a9510d330ec98cef33c612d195 (diff) | |
parent | 724f5f3178b917259e9a7d3f6ff84d4b8db5a3cb (diff) |
Merge pull request #35130 from qarmin/crash_item_bad_index
Don't allow to use too big index in ItemList
-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(); |