mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 17:13:25 +00:00
Ensure the diff hunk callback is specified before trying to dereference it
This commit is contained in:
parent
636af2198e
commit
bb6aafe88f
@ -823,7 +823,8 @@ int git_patch__invoke_callbacks(
|
||||
for (i = 0; !error && i < git_array_size(patch->hunks); ++i) {
|
||||
diff_patch_hunk *h = git_array_get(patch->hunks, i);
|
||||
|
||||
error = hunk_cb(patch->delta, &h->hunk, payload);
|
||||
if (hunk_cb)
|
||||
error = hunk_cb(patch->delta, &h->hunk, payload);
|
||||
|
||||
if (!line_cb)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user