Commit f7de5a56 authored by Martin Koegler's avatar Martin Koegler Committed by Junio C Hamano

reachable.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: default avatarMartin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent cc369347
......@@ -15,6 +15,8 @@ static void process_blob(struct blob *blob,
{
struct object *obj = &blob->object;
if (!blob)
die("bad blob object");
if (obj->flags & SEEN)
return;
obj->flags |= SEEN;
......@@ -39,6 +41,8 @@ static void process_tree(struct tree *tree,
struct name_entry entry;
struct name_path me;
if (!tree)
die("bad tree object");
if (obj->flags & SEEN)
return;
obj->flags |= SEEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment