summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-08-24 12:16:15 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-08-24 12:16:15 -0700
commitc43a1bede3319ee95c21e753ed53d907041f5cee (patch)
tree6a47e96aaa54ee7e9efe3f4c0ed7b8b709dfe900 /upload-pack.c
parentUpdate draft release notes for 1.7.6.1 (diff)
parentget_indexed_object can return NULL if nothing is in that slot; check for it (diff)
downloadtgif-c43a1bede3319ee95c21e753ed53d907041f5cee.tar.xz
Merge branch 'jc/maint-smart-http-race-upload-pack' into maint
* jc/maint-smart-http-race-upload-pack: get_indexed_object can return NULL if nothing is in that slot; check for it
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/upload-pack.c b/upload-pack.c
index a9a6c0cb24..03adf28550 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -533,6 +533,8 @@ static void check_non_tip(void)
namebuf[41] = '\n';
for (i = get_max_object_index(); 0 < i; ) {
o = get_indexed_object(--i);
+ if (!o)
+ continue;
if (!(o->flags & OUR_REF))
continue;
memcpy(namebuf + 1, sha1_to_hex(o->sha1), 40);