diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:26:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:26:56 -0700 |
commit | c7528f4d8a2b8e4bf843b3eb95d2b7899a38c1fa (patch) | |
tree | f844bdf385f2f7cdd78ee77e3ce7b312da62e8ce /tree-diff.c | |
parent | df422678a800ffb1db8f3f146e2786f1cbf0059b (diff) | |
parent | f730944a49b2a210bb10520700c0a3f6c49bc020 (diff) | |
download | git-c7528f4d8a2b8e4bf843b3eb95d2b7899a38c1fa.tar.gz |
Merge branch 'bw/object-id'
Conversion from uchar[20] to struct object_id continues.
* bw/object-id:
receive-pack: don't access hash of NULL object_id pointer
notes: don't access hash of NULL object_id pointer
tree-diff: don't access hash of NULL object_id pointer
Diffstat (limited to 'tree-diff.c')
-rw-r--r-- | tree-diff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tree-diff.c b/tree-diff.c index bd6d65a409..2357f72899 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -421,8 +421,9 @@ static struct combine_diff_path *ll_diff_tree_paths( * diff_tree_oid(parent, commit) ) */ for (i = 0; i < nparent; ++i) - tptree[i] = fill_tree_descriptor(&tp[i], parents_oid[i]->hash); - ttree = fill_tree_descriptor(&t, oid->hash); + tptree[i] = fill_tree_descriptor(&tp[i], + parents_oid[i] ? parents_oid[i]->hash : NULL); + ttree = fill_tree_descriptor(&t, oid ? oid->hash : NULL); /* Enable recursion indefinitely */ opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE); |