Merge pull request #98692 from Sticksman/bug-fix-98668

Fix crash in Quick Open Dialog
This commit is contained in:
Thaddeus Crews 2024-11-10 12:12:15 -06:00
commit 5b895b2b3f
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -489,6 +489,10 @@ void QuickOpenResultContainer::handle_search_box_input(const Ref<InputEvent> &p_
}
void QuickOpenResultContainer::_move_selection_index(Key p_key) {
// Don't move selection if there are no results.
if (num_visible_results <= 0) {
return;
}
const int max_index = num_visible_results - 1;
int idx = selection_index;