Code

merge-recursive: handle file mode changes
[git.git] / refs.c
diff --git a/refs.c b/refs.c
index 67d2a502afb60050f0ce750c21ae1a42fa5cb803..fb33da111240d9a3d579dfebb05eef951fecee23 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -506,7 +506,7 @@ int peel_ref(const char *ref, unsigned char *sha1)
 
        /* fallback - callers should not call this for unpacked refs */
        o = parse_object(base);
-       if (o->type == OBJ_TAG) {
+       if (o && o->type == OBJ_TAG) {
                o = deref_tag(o, ref, 0);
                if (o) {
                        hashcpy(sha1, o->sha1);