diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-04-15 11:59:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-15 11:59:50 +0200 |
commit | e44444ea2dfdcc8125caa6708c8d0ca7036d3527 (patch) | |
tree | f27c619db85cb4cc96a85b51721ba162b9753216 /scene | |
parent | ecab0ea959665e7cceca481577bd0ea81cccd3bb (diff) | |
parent | cbcb96ae85283b8053d4b731ce7912e50b849791 (diff) |
Merge pull request #18196 from ShyRed/fix18195
ItemList selection: Check against item count
Diffstat (limited to 'scene')
-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 ecd98f054d..511dc248a0 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -678,7 +678,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) { 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); ensure_current_is_visible(); if (select_mode == SELECT_SINGLE) { |