diff --git a/Octree/include/CGAL/Octree.h b/Octree/include/CGAL/Octree.h index e1e3b70de95..1cd00ab1c71 100644 --- a/Octree/include/CGAL/Octree.h +++ b/Octree/include/CGAL/Octree.h @@ -244,6 +244,9 @@ public: // Split the node, redistributing its points to its children split((*current)); + // Check if we've reached a new max depth + m_max_depth_reached = (std::max)(current->depth(), m_max_depth_reached); + // Process each of its children for (int i = 0; i < 8; ++i) todo.push(&(*current)[i]);