Code

gitview: Read tag and branch information using git ls-remote
[git.git] / fsck-objects.c
index 9950be264501a5c99eafe7c2438b27b857ba6402..6439d55126a615c04db1be16ebcaf8b0af9f7ae3 100644 (file)
@@ -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 */