diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h index 68c71a271519..ae2544567d73 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h @@ -260,7 +260,10 @@ class Poisson_reconstruction_function Cell_handle get() const { - return Triangulation_data_structure::Cell_range::s_iterator_to(*m_cell); + if(m_cell == nullptr) + return {}; + else + return Triangulation_data_structure::Cell_range::s_iterator_to(*m_cell); } void set (Cell_handle ch) { m_cell = ch.operator->(); } };