From 8b62a7cb7da9c21d55c1e161d207fe0d20eff7b9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 28 Sep 2017 03:37:29 +0200 Subject: [PATCH] Fix crash that could occur upon loading content --- menu/cbs/menu_cbs_ok.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 07d5c459b4..56b21f594c 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1389,7 +1389,8 @@ static int action_ok_file_load(const char *path, if (setting_get_type(setting) == ST_PATH) return action_ok_set_path(path, label, type, idx, entry_idx); - strlcpy(menu_path_new, menu_path, sizeof(menu_path_new)); + if (menu_path && !string_is_empty(menu_path)) + strlcpy(menu_path_new, menu_path, sizeof(menu_path_new)); if ( string_is_equal(menu_label,