summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-24 12:44:46 -0800
committerJunio C Hamano <gitster@pobox.com>2010-11-24 12:44:46 -0800
commit2f9d2e22cb553d26e355e63171678a848170dcf8 (patch)
tree9b2b237fb9cc9beee2c602ce3c7822b0b456fcb8 /builtin
parenteeae6d754627343cfa9f1c72c5c00a3d949e9302 (diff)
parent6355e505bacf0a12a5de77bcd0c1198e74ad340b (diff)
downloadgit-2f9d2e22cb553d26e355e63171678a848170dcf8.tar.gz
Merge branch 'bc/fix-cherry-pick-root' into maint
* bc/fix-cherry-pick-root: builtin/revert.c: don't dereference a NULL pointer
Diffstat (limited to 'builtin')
-rw-r--r--builtin/revert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index 4b47ace36b..57b51e4a0e 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -442,7 +442,7 @@ static int do_pick_commit(void)
else
parent = commit->parents->item;
- if (allow_ff && !hashcmp(parent->object.sha1, head))
+ if (allow_ff && parent && !hashcmp(parent->object.sha1, head))
return fast_forward_to(commit->object.sha1, head);
if (parent && parse_commit(parent) < 0)