Don't dereference NULL upon lookup failure.
Don't dereference NULL upon lookup failure.

Instead, signal the error just like the case we do upon encountering
an object with an unknown type.

Signed-off-by: Jim Meyering <15b0b14300fba1cff8c70eb2a5c1720ef2a4c654@redhat.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git