summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/gui/item_list.cpp2
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();