Don't allow to use too big index in ItemList
This commit is contained in:
parent
56d8a2295d
commit
724f5f3178
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue