diff --git a/builtin-log.c b/builtin-log.c
index 840daf907897391fb193706982e2274c2a9e1014..99d1137b081d2e14d75e3d4d1766c3bf921f1493 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
t->tag,
diff_get_color_opt(&rev.diffopt, DIFF_RESET));
ret = show_object(o->sha1, 1, &rev);
- objects[i].item = parse_object(t->tagged->sha1);
+ if (ret)
+ break;
+ o = parse_object(t->tagged->sha1);
+ if (!o)
+ ret = error("Could not read object %s",
+ sha1_to_hex(t->tagged->sha1));
+ objects[i].item = o;
i--;
break;
}