diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-10-06 12:11:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-10-06 12:11:20 -0700 |
commit | 4ac9aeb2b217090b750773cf87be361b88b253a6 (patch) | |
tree | 1ba99808b195a9042d4de44cf33f0ba0d019d7f9 /builtin | |
parent | 90d6bd5ed3bd5de7be037abace4afa065fb2207b (diff) | |
parent | 6355e505bacf0a12a5de77bcd0c1198e74ad340b (diff) | |
download | git-4ac9aeb2b217090b750773cf87be361b88b253a6.tar.gz git-4ac9aeb2b217090b750773cf87be361b88b253a6.tar.xz |
Merge branch 'bc/fix-cherry-pick-root'
* bc/fix-cherry-pick-root:
builtin/revert.c: don't dereference a NULL pointer
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/revert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index 4b47ace36..57b51e4a0 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) |