(menu_cbs_ok.c) Fix explicit NULL dereferenced warnings

This commit is contained in:
twinaphex 2016-06-05 19:04:59 +02:00
parent 693ce8f6e5
commit a6175a3989
1 changed files with 7 additions and 4 deletions

View File

@ -317,7 +317,9 @@ int generic_action_ok_displaylist_push(const char *path,
break;
}
if (!string_is_empty(path))
strlcpy(menu->scratch_buf, path, sizeof(menu->scratch_buf));
if (!string_is_empty(menu_path))
strlcpy(menu->scratch2_buf, menu_path, sizeof(menu->scratch2_buf));
break;
case ACTION_OK_DL_PARENT_DIRECTORY_PUSH:
@ -1417,6 +1419,7 @@ static void cb_generic_download(void *task_data,
goto finish;
}
if (!string_is_empty(dir_path))
fill_pathname_join(output_path, dir_path,
transf->path, sizeof(output_path));