From 6b57791b0a2f31a0437c22602348c868b341e339 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 23 May 2017 10:46:42 +0200 Subject: [PATCH] Don't show up empty entries if there are no playlists --- menu/drivers/xmb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 7dc08f9cd3..0ea380d392 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1766,12 +1766,15 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb) info.enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST; info.setting = NULL; - if (menu_displaylist_ctl(DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, &info)) + if (!string_is_empty(info.path)) { - size_t i; - for (i=0; i < xmb->horizontal_list->size; i++) - xmb_node_allocate_userdata(xmb, (unsigned)i); - menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info); + if (menu_displaylist_ctl(DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL, &info)) + { + size_t i; + for (i=0; i < xmb->horizontal_list->size; i++) + xmb_node_allocate_userdata(xmb, (unsigned)i); + menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info); + } } }