list-objects.c::process_tree/blob: check for NULL
As these functions are directly called with the result from lookup_tree/blob, they must handle NULL. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c34066358a
commit
a301b0c8f2
@ -18,6 +18,8 @@ static void process_blob(struct rev_info *revs,
|
|||||||
|
|
||||||
if (!revs->blob_objects)
|
if (!revs->blob_objects)
|
||||||
return;
|
return;
|
||||||
|
if (!obj)
|
||||||
|
die("bad blob object");
|
||||||
if (obj->flags & (UNINTERESTING | SEEN))
|
if (obj->flags & (UNINTERESTING | SEEN))
|
||||||
return;
|
return;
|
||||||
obj->flags |= SEEN;
|
obj->flags |= SEEN;
|
||||||
@ -69,6 +71,8 @@ static void process_tree(struct rev_info *revs,
|
|||||||
|
|
||||||
if (!revs->tree_objects)
|
if (!revs->tree_objects)
|
||||||
return;
|
return;
|
||||||
|
if (!obj)
|
||||||
|
die("bad tree object");
|
||||||
if (obj->flags & (UNINTERESTING | SEEN))
|
if (obj->flags & (UNINTERESTING | SEEN))
|
||||||
return;
|
return;
|
||||||
if (parse_tree(tree) < 0)
|
if (parse_tree(tree) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user