diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index d38d7ffeabd..ad339ef5ca7 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -2680,8 +2680,12 @@ collect_garbage(Visitor &visitor) for (i=0; i +#include + + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Epick; + +int main() +{ +CGAL::Surface_mesh mesh; + auto f0 = mesh.add_face(); + auto f1 = mesh.add_face(); // If this line is commented out, it will not crash. + mesh.remove_face(f0); + + auto v0 = mesh.add_vertex(); + auto v1 = mesh.add_vertex(); // If this line is commented out, it will not crash. + mesh.remove_vertex(v0); + + auto e0 = mesh.add_edge(); + auto e1 = mesh.add_edge(); // If this line is commented out, it will not crash. + mesh.remove_edge(edge(e0,mesh)); + + + mesh.collect_garbage(); + + return 0; +} \ No newline at end of file