From 3ae52e2095db684616d84b36909be9e4ea5d5ffe Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 24 Feb 2017 06:58:22 +0100 Subject: [PATCH] Prevent potential crashes when pressing left/right on playlists --- menu/cbs/menu_cbs_left.c | 2 +- menu/cbs/menu_cbs_right.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 521df25c85..2cedf69859 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -352,7 +352,7 @@ static int playlist_association_left(unsigned type, const char *label, info = core_info_get(list, next); found = string_list_find_elem(stnames, path); - if (found) + if (found && info) string_list_set(stcores, found-1, info->path); string_list_join_concat(new_playlist_cores, diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 6ad3a537dc..2f5148c9fb 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -353,7 +353,7 @@ static int playlist_association_right(unsigned type, const char *label, info = core_info_get(list, next); found = string_list_find_elem(stnames, path); - if (found) + if (found && info) string_list_set(stcores, found-1, info->path); string_list_join_concat(new_playlist_cores, sizeof(new_playlist_cores), stcores, ";");