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 /builtin/notes.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 'builtin/notes.c')
-rw-r--r-- | builtin/notes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index 77573cf1ea..4303848e04 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -456,7 +456,7 @@ static int add(int argc, const char **argv, const char *prefix) oid_to_hex(&object)); } - prepare_note_data(&object, &d, note->hash); + prepare_note_data(&object, &d, note ? note->hash : NULL); if (d.buf.len || allow_empty) { write_note_data(&d, new_note.hash); if (add_note(t, &object, &new_note, combine_notes_overwrite)) |