git cherry-pick: do not dereference a potential NULL pointer
authorNeil Horman <nhorman@tuxdriver.com>
Thu, 3 May 2012 12:10:22 +0000 (08:10 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 May 2012 22:41:35 +0000 (15:41 -0700)
In the case the pointer could be NULL, the function that gave the caller
the NULL pointer would already have issued an error message, so simply
returning early with an error status without issuing a new message is
sufficient. The same for parse_commit() that will show necessary error
message when the argument is not NULL, and will return error silently
when the argument is NULL.

Noticed-by: Michael Mueller
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found