Avoid crash if ozone sidebar_index_size is 0 (#15693)

This commit is contained in:
Eric Warmenhoven 2023-09-14 12:11:07 -04:00 committed by GitHub
parent c5f6175f12
commit 6e453b5ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8351,7 +8351,7 @@ static enum menu_action ozone_parse_menu_entry_action(
if (menu_st->scroll.mode == MENU_SCROLL_PAGE)
new_selection = (int)(tab_selection - 10);
else
else if (ozone->sidebar_index_size)
{
/* Alphabetical scroll */
size_t l = ozone->sidebar_index_size - 1;