diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-11-10 12:12:15 -0600 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-11-10 12:12:15 -0600 |
commit | 5b895b2b3f5fbbbe5f1b68b1ec8597c156e95537 (patch) | |
tree | 18ca81daf84f61fab819a4dda26ce0cff036a784 | |
parent | 2b02143d35ed6bf271cb30ae70a927e76b9f5088 (diff) | |
parent | f491d2fe2475bfd696a2094b60f5ae55efb3d2ad (diff) | |
download | redot-engine-5b895b2b3f5fbbbe5f1b68b1ec8597c156e95537.tar.gz |
Merge pull request #98692 from Sticksman/bug-fix-98668
Fix crash in Quick Open Dialog
-rw-r--r-- | editor/gui/editor_quick_open_dialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/gui/editor_quick_open_dialog.cpp b/editor/gui/editor_quick_open_dialog.cpp index b8f3b259ca..0128f1f54c 100644 --- a/editor/gui/editor_quick_open_dialog.cpp +++ b/editor/gui/editor_quick_open_dialog.cpp @@ -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; |