From 6bb5af8ee0075bdf09b7ac87980c48cc15446b0f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 4 Oct 2017 06:36:23 +0200 Subject: [PATCH] Cleanups --- menu/menu_displaylist.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index c4d36f09b8..c1d7217581 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1540,13 +1540,17 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info, if (core_name) strlcpy(fill_buf, core_name, path_size); - if (!is_history && i == selection) + if (!is_history && i == selection && !string_is_empty(label)) { char *content_basename = strdup(label); - menu_driver_set_thumbnail_content(content_basename, strlen(content_basename) + 1); - menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL); - menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL); - free(content_basename); + + if (!string_is_empty(content_basename)) + { + menu_driver_set_thumbnail_content(content_basename, strlen(content_basename) + 1); + menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL); + menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL); + free(content_basename); + } } if (path)