Merge pull request #18196 from ShyRed/fix18195

ItemList selection: Check against item count
This commit is contained in:
Rémi Verschelde 2018-04-15 11:59:50 +02:00 committed by GitHub
commit e44444ea2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -678,7 +678,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
search_string = ""; //any mousepress cancels search_string = ""; //any mousepress cancels
if (current % current_columns != (current_columns - 1)) { if (current % current_columns != (current_columns - 1) && current + 1 < items.size()) {
set_current(current + 1); set_current(current + 1);
ensure_current_is_visible(); ensure_current_is_visible();
if (select_mode == SELECT_SINGLE) { if (select_mode == SELECT_SINGLE) {