summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorLibravatar Martin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 08:31:54 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-17 23:46:55 -0800
commitaffeef12fb2d10317fbcc7a866fbc3603cf16119 (patch)
tree61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /merge-recursive.c
parenthelp.c: use 'git_config_string' to get 'help_default_format'. (diff)
downloadtgif-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.xz
deref_tag: handle return value NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index dd52342539..55ef76f5a5 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1673,6 +1673,8 @@ static struct commit *get_ref(const char *ref)
if (get_sha1(ref, sha1))
die("Could not resolve ref '%s'", ref);
object = deref_tag(parse_object(sha1), ref, strlen(ref));
+ if (!object)
+ return NULL;
if (object->type == OBJ_TREE)
return make_virtual_commit((struct tree*)object,
better_branch_name(ref));