diff options
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | 2008-02-18 08:31:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-17 23:46:55 -0800 |
commit | affeef12fb2d10317fbcc7a866fbc3603cf16119 (patch) | |
tree | 61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /merge-recursive.c | |
parent | help.c: use 'git_config_string' to get 'help_default_format'. (diff) | |
download | tgif-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.c | 2 |
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)); |