Fix crash in cases when first BA step happens with all zero-weighted tracks
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 22 Jul 2014 18:46:26 +0000 (00:46 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 22 Jul 2014 18:46:26 +0000 (00:46 +0600)
extern/libmv/libmv/simple_pipeline/bundle.cc

index fc1882a0b7290afc56550db7dcdce951c54dba0d..09b55f34eef0ba6bce7fe9e447619f83c9067d15 100644 (file)
@@ -539,9 +539,8 @@ void EuclideanBundleCommonIntrinsics(
       }
 
       zero_weight_tracks_flags[marker.track] = false;
+      num_residuals++;
     }
-
-    num_residuals++;
   }
   LG << "Number of residuals: " << num_residuals;