From 29ba7a8992ebfb5f4b05aab290011cf4bed69eda Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 7 May 2019 10:19:44 +0200 Subject: [PATCH] check that there are at least 2 points in the polyline before testing --- Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h index 56b4492a42f..92892a87b39 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h @@ -221,7 +221,8 @@ class Polygon_mesh_slicer void end_polyline() { CGAL_assertion(!current_poly.empty()); - if(is_polyline_cw_oriented(current_poly.begin(), current_poly.end())) + if(current_poly.size()>1 + && is_polyline_cw_oriented(current_poly.begin(), current_poly.end())) { std::reverse(current_poly.begin(), current_poly.end()); }