diff --git a/vcg/space/index/space_iterators.h b/vcg/space/index/space_iterators.h index 694875da..b2e2478b 100644 --- a/vcg/space/index/space_iterators.h +++ b/vcg/space/index/space_iterators.h @@ -334,6 +334,9 @@ class ClosestIterator ///add cell to the curren set of explored cells void _NextShell() { + if (radius>=max_dist) + end=true; + radius+=voxel_min; //control bounds if (radius>max_dist)