fix a segfault in sandbox.c if handle->dlcb is null
This commit is contained in:
parent
8a60361949
commit
a2d029388c
1 changed files with 3 additions and 1 deletions
|
@ -235,7 +235,9 @@ bool _alpm_sandbox_process_cb_download(alpm_handle_t *handle, int callback_pipe)
|
|||
ASSERT(read_from_pipe(callback_pipe, filename, filename_size) != -1, FREE(filename); return false);
|
||||
filename[filename_size] = '\0';
|
||||
|
||||
handle->dlcb(handle->dlcb_ctx, filename, type, &cb_data);
|
||||
if(handle->dlcb) {
|
||||
handle->dlcb(handle->dlcb_ctx, filename, type, &cb_data);
|
||||
}
|
||||
FREE(filename);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue