aboutsummaryrefslogtreecommitdiff
path: root/builtin-blame.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-blame.c')
-rw-r--r--builtin-blame.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 16660221c..066dee743 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -1407,7 +1407,8 @@ static int read_ancestry(const char *graft_file)
/* The format is just "Commit Parent1 Parent2 ...\n" */
int len = strlen(buf);
struct commit_graft *graft = read_graft_line(buf, len);
- register_commit_graft(graft, 0);
+ if (graft)
+ register_commit_graft(graft, 0);
}
fclose(fp);
return 0;