From: Martin Koegler Date: Mon, 18 Feb 2008 20:47:55 +0000 (+0100) Subject: reachable.c::add_one_tree: handle NULL from lookup_tree X-Git-Tag: v1.5.5-rc0~93^2~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c34066358a604e3ccb6afcf5679fa8a84be79936;p=git.git reachable.c::add_one_tree: handle NULL from lookup_tree Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- diff --git a/reachable.c b/reachable.c index 6383401e2..ddf39e556 100644 --- a/reachable.c +++ b/reachable.c @@ -150,7 +150,8 @@ static int add_one_reflog(const char *path, const unsigned char *sha1, int flag, static void add_one_tree(const unsigned char *sha1, struct rev_info *revs) { struct tree *tree = lookup_tree(sha1); - add_pending_object(revs, &tree->object, ""); + if (tree) + add_pending_object(revs, &tree->object, ""); } static void add_cache_tree(struct cache_tree *it, struct rev_info *revs)