Commit f73df331 authored by Martin Koegler's avatar Martin Koegler Committed by Junio C Hamano

peel_onion: handle NULL

Signed-off-by: default avatarMartin Koegler <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent dec38c81
......@@ -494,8 +494,11 @@ static int peel_onion(const char *name, int len, unsigned char *sha1)
return error("%.*s: expected %s type, but the object dereferences to %s type",
len, name, typename(expected_type),
if (!o)
return -1;
if (!o->parsed)
if (!parse_object(o->sha1))
return -1;
return 0;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment