aboutsummaryrefslogtreecommitdiff
path: root/fsck-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'fsck-objects.c')
-rw-r--r--fsck-objects.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fsck-objects.c b/fsck-objects.c
index 9950be264..6439d5512 100644
--- a/fsck-objects.c
+++ b/fsck-objects.c
@@ -61,9 +61,12 @@ static void check_connectivity(void)
int i;
/* Look up all the requirements, warn about missing objects.. */
- for (i = 0; i < nr_objs; i++) {
+ for (i = 0; i < obj_allocs; i++) {
struct object *obj = objs[i];
+ if (!obj)
+ continue;
+
if (!obj->parsed) {
if (!standalone && has_sha1_file(obj->sha1))
; /* it is in pack */