From: Martin Koegler Date: Mon, 18 Feb 2008 20:47:54 +0000 (+0100) Subject: mark_blob/tree_uninteresting: check for NULL X-Git-Tag: v1.5.5-rc0~93^2~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c1ee9013ad5acfff47a36899af7d485f6d60fa83;p=git.git mark_blob/tree_uninteresting: check for NULL As these functions are directly called with the result from lookup_tree/blob, they must handle NULL. Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- diff --git a/revision.c b/revision.c index 6e85aaa3f..484e5e795 100644 --- a/revision.c +++ b/revision.c @@ -46,6 +46,8 @@ void add_object(struct object *obj, static void mark_blob_uninteresting(struct blob *blob) { + if (!blob) + return; if (blob->object.flags & UNINTERESTING) return; blob->object.flags |= UNINTERESTING; @@ -57,6 +59,8 @@ void mark_tree_uninteresting(struct tree *tree) struct name_entry entry; struct object *obj = &tree->object; + if (!tree) + return; if (obj->flags & UNINTERESTING) return; obj->flags |= UNINTERESTING;