diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index a6835a190b9..2e8e90c82b2 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -342,6 +342,8 @@ public: // initialize proxies and the proxy map to prepare for insertion bootstrap_from_connected_components(); + if (max_nb_proxies <= m_proxies.size()) + return m_proxies.size(); switch (method) { case Surface_mesh_approximation::RANDOM: return init_random(max_nb_proxies, min_error_drop, nb_relaxations);