From 6e453b5ba0599abe72f2f62fad3b79ddfc3ca442 Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Thu, 14 Sep 2023 12:11:07 -0400 Subject: [PATCH] Avoid crash if ozone sidebar_index_size is 0 (#15693) --- menu/drivers/ozone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 1f52011188..01cbf3fa4a 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -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;