fix degree of an isolated vertex

This commit is contained in:
Sébastien Loriot 2021-08-04 15:22:14 +02:00
parent 01323fa16e
commit 0361a83cd3
1 changed files with 2 additions and 1 deletions

View File

@ -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