Prevent explicit NULL pointer dereference

This commit is contained in:
twinaphex 2016-09-24 16:58:02 +02:00
parent 3aea25479c
commit 09cc6c41b9

View File

@ -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),