summaryrefslogtreecommitdiff
path: root/reachable.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 20:47:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-19 03:25:22 (GMT)
commitc34066358a604e3ccb6afcf5679fa8a84be79936 (patch)
tree64e198f8055585c97782be9162912b647c5a0d60 /reachable.c
parentc1ee9013ad5acfff47a36899af7d485f6d60fa83 (diff)
downloadgit-c34066358a604e3ccb6afcf5679fa8a84be79936.zip
git-c34066358a604e3ccb6afcf5679fa8a84be79936.tar.gz
git-c34066358a604e3ccb6afcf5679fa8a84be79936.tar.bz2
reachable.c::add_one_tree: handle NULL from lookup_tree
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.c')
-rw-r--r--reachable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/reachable.c b/reachable.c
index 6383401..ddf39e5 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)