From 0361a83cd31d3744dc788bc65d42824160cc239d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 4 Aug 2021 15:22:14 +0200 Subject: [PATCH] fix degree of an isolated vertex --- Polyhedron/include/CGAL/Polyhedron_3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polyhedron/include/CGAL/Polyhedron_3.h b/Polyhedron/include/CGAL/Polyhedron_3.h index 278d3b9b8a2..922c5110e69 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3.h +++ b/Polyhedron/include/CGAL/Polyhedron_3.h @@ -111,7 +111,8 @@ public: // the degree of the vertex, i.e., edges emanating from this vertex std::size_t vertex_degree() const { - return this->halfedge()->vertex_degree(); + return this->halfedge()!=Halfedge_const_handle() + ? this->halfedge()->vertex_degree() : 0; } size_type degree() const { return vertex_degree(); } //backwards compatible