mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 20:43:10 +00:00
Fix crash with savestate thumbnails
This commit is contained in:
parent
638a441530
commit
e376bd75c0
@ -1038,6 +1038,7 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
|
||||
if (!string_is_empty(xmb->savestate_thumbnail_file_path))
|
||||
free(xmb->savestate_thumbnail_file_path);
|
||||
xmb->savestate_thumbnail_file_path = NULL;
|
||||
|
||||
if (!string_is_empty(entry.label))
|
||||
{
|
||||
@ -1067,7 +1068,11 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
strlcat(path, file_path_str(FILE_PATH_PNG_EXTENSION), path_size);
|
||||
|
||||
if (path_file_exists(path))
|
||||
{
|
||||
if (!string_is_empty(xmb->savestate_thumbnail_file_path))
|
||||
free(xmb->savestate_thumbnail_file_path);
|
||||
xmb->savestate_thumbnail_file_path = strdup(path);
|
||||
}
|
||||
|
||||
free(path);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ char *menu_entry_get_sublabel(menu_entry_t *entry)
|
||||
|
||||
void menu_entry_get_label(menu_entry_t *entry, char *s, size_t len)
|
||||
{
|
||||
if (!entry)
|
||||
if (!entry || string_is_empty(entry->label))
|
||||
return;
|
||||
strlcpy(s, entry->label, len);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user