Prevent explicit NULL pointer dereference

This commit is contained in:
twinaphex 2016-09-24 16:58:02 +02:00
parent 3aea25479c
commit 09cc6c41b9
1 changed files with 2 additions and 3 deletions

View File

@ -1606,6 +1606,7 @@ static int generic_action_ok_shader_preset_save(const char *path,
switch (action_type) switch (action_type)
{ {
case ACTION_OK_SHADER_PRESET_SAVE_CORE: case ACTION_OK_SHADER_PRESET_SAVE_CORE:
if (!string_is_empty(core_name))
fill_pathname_join(file, directory, core_name, sizeof(file)); fill_pathname_join(file, directory, core_name, sizeof(file));
break; break;
case ACTION_OK_SHADER_PRESET_SAVE_GAME: case ACTION_OK_SHADER_PRESET_SAVE_GAME:
@ -1616,8 +1617,6 @@ static int generic_action_ok_shader_preset_save(const char *path,
break; break;
} }
if(menu_shader_manager_save_preset(file, false, true)) if(menu_shader_manager_save_preset(file, false, true))
runloop_msg_queue_push( runloop_msg_queue_push(
msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY), msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY),