Skip to content

Commit

Permalink
reachable.c::add_one_tree: handle NULL from lookup_tree
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Martin Koegler authored and gitster committed Feb 19, 2008
1 parent c1ee901 commit c340663
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion reachable.c
Expand Up @@ -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)
Expand Down

0 comments on commit c340663

Please sign in to comment.