]> git.ipfire.org Git - thirdparty/git.git/blobdiff - blame.c
Merge branch 'en/merge-ort-api-null-impl'
[thirdparty/git.git] / blame.c
diff --git a/blame.c b/blame.c
index 686845b2b43dffe35d9f9811b61c80a0e0536332..de7b5d411fe3386661bea93388589977c67b3929 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -2670,7 +2670,7 @@ static struct commit *find_single_final(struct rev_info *revs,
                if (obj->flags & UNINTERESTING)
                        continue;
                obj = deref_tag(revs->repo, obj, NULL, 0);
-               if (obj->type != OBJ_COMMIT)
+               if (!obj || obj->type != OBJ_COMMIT)
                        die("Non commit %s?", revs->pending.objects[i].name);
                if (found)
                        die("More than one commit to dig from %s and %s?",
@@ -2701,7 +2701,7 @@ static struct commit *dwim_reverse_initial(struct rev_info *revs,
        /* Is that sole rev a committish? */
        obj = revs->pending.objects[0].item;
        obj = deref_tag(revs->repo, obj, NULL, 0);
-       if (obj->type != OBJ_COMMIT)
+       if (!obj || obj->type != OBJ_COMMIT)
                return NULL;
 
        /* Do we have HEAD? */
@@ -2737,7 +2737,7 @@ static struct commit *find_single_initial(struct rev_info *revs,
                if (!(obj->flags & UNINTERESTING))
                        continue;
                obj = deref_tag(revs->repo, obj, NULL, 0);
-               if (obj->type != OBJ_COMMIT)
+               if (!obj || obj->type != OBJ_COMMIT)
                        die("Non commit %s?", revs->pending.objects[i].name);
                if (found)
                        die("More than one commit to dig up from, %s and %s?",