mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Prevent potential crashes when pressing left/right on playlists
This commit is contained in:
parent
26474ee99e
commit
3ae52e2095
@ -352,7 +352,7 @@ static int playlist_association_left(unsigned type, const char *label,
|
|||||||
|
|
||||||
info = core_info_get(list, next);
|
info = core_info_get(list, next);
|
||||||
found = string_list_find_elem(stnames, path);
|
found = string_list_find_elem(stnames, path);
|
||||||
if (found)
|
if (found && info)
|
||||||
string_list_set(stcores, found-1, info->path);
|
string_list_set(stcores, found-1, info->path);
|
||||||
|
|
||||||
string_list_join_concat(new_playlist_cores,
|
string_list_join_concat(new_playlist_cores,
|
||||||
|
@ -353,7 +353,7 @@ static int playlist_association_right(unsigned type, const char *label,
|
|||||||
info = core_info_get(list, next);
|
info = core_info_get(list, next);
|
||||||
|
|
||||||
found = string_list_find_elem(stnames, path);
|
found = string_list_find_elem(stnames, path);
|
||||||
if (found)
|
if (found && info)
|
||||||
string_list_set(stcores, found-1, info->path);
|
string_list_set(stcores, found-1, info->path);
|
||||||
|
|
||||||
string_list_join_concat(new_playlist_cores, sizeof(new_playlist_cores), stcores, ";");
|
string_list_join_concat(new_playlist_cores, sizeof(new_playlist_cores), stcores, ";");
|
||||||
|
Loading…
Reference in New Issue
Block a user