From 74a2020dbfab7b0a334e8763b58157828105586c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 31 Oct 2018 15:17:28 +0100 Subject: [PATCH] Deal with empty mesh --- .../CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 0d93faf3000..8e8808764ff 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -486,6 +486,9 @@ public: template void estimate_geodesic_distances(VertexDistanceMap vdm) { + if(is_empty(tm)){ + return; + } double d=0; if(source_change_flag) { //don't need to recompute Mass matrix, cotan matrix or timestep reflect that in this function @@ -513,6 +516,9 @@ private: typename Traits::Compute_scalar_product_3 scalar_product = Traits().compute_scalar_product_3_object(); typename Traits::Construct_vector_3 construct_vector = Traits().construct_vector_3_object(); + if(is_empty(tm)){ + return; + } source_change_flag = false; CGAL_precondition(is_triangle_mesh(tm));