summaryrefslogtreecommitdiff
path: root/reachable.c
diff options
context:
space:
mode:
Diffstat (limited to 'reachable.c')
-rw-r--r--reachable.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/reachable.c b/reachable.c
index 11499a60c4..96a984c693 100644
--- a/reachable.c
+++ b/reachable.c
@@ -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;