From 09cc6c41b9de5384ea2b13df48d1737bccf21b34 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 24 Sep 2016 16:58:02 +0200 Subject: [PATCH] Prevent explicit NULL pointer dereference --- menu/cbs/menu_cbs_ok.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 7f53bf7a04..f0a5d4d91a 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1606,7 +1606,8 @@ static int generic_action_ok_shader_preset_save(const char *path, switch (action_type) { case ACTION_OK_SHADER_PRESET_SAVE_CORE: - fill_pathname_join(file, directory, core_name, sizeof(file)); + if (!string_is_empty(core_name)) + fill_pathname_join(file, directory, core_name, sizeof(file)); break; case ACTION_OK_SHADER_PRESET_SAVE_GAME: { @@ -1616,8 +1617,6 @@ static int generic_action_ok_shader_preset_save(const char *path, break; } - - if(menu_shader_manager_save_preset(file, false, true)) runloop_msg_queue_push( msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY),