Show 'No Items' when there are no entries in menu_displaylist_parse

This commit is contained in:
twinaphex 2015-05-15 01:24:51 +02:00
parent e874e1c409
commit 67ffac265b
1 changed files with 11 additions and 1 deletions

View File

@ -252,7 +252,16 @@ static int menu_displaylist_parse(menu_displaylist_info_t *info, bool *need_sort
list_size = str_list->size;
for (i = 0; i < str_list->size; i++)
if (list_size <= 0)
{
menu_list_push(info->list,
"No items.", "", 0, 0);
string_list_free(str_list);
return 0;
}
for (i = 0; i < list_size; i++)
{
bool is_dir;
const char *path = NULL;
@ -550,6 +559,7 @@ static int menu_displaylist_parse_cores(menu_displaylist_info_t *info)
menu_list_push(info->list,
"No cores available.", "",
0, 0);
return 0;
}
for (i = 0; i < list_size; i++)