mirror of https://github.com/CGAL/cgal
BUGFIX: Avoid segfault when calling find_optimal_alpha with less that 3 points
This commit is contained in:
parent
bed9ead9ba
commit
1c2852d004
|
|
@ -1407,6 +1407,8 @@ Alpha_shape_2<Dt>::find_alpha_solid() const
|
||||||
// takes O(#alpha_shape) time
|
// takes O(#alpha_shape) time
|
||||||
Coord_type alpha_solid = 0;
|
Coord_type alpha_solid = 0;
|
||||||
|
|
||||||
|
if (number_of_vertices()<3) return alpha_solid;
|
||||||
|
|
||||||
Finite_vertices_iterator vertex_it;
|
Finite_vertices_iterator vertex_it;
|
||||||
// only finite vertices
|
// only finite vertices
|
||||||
for( vertex_it = finite_vertices_begin();
|
for( vertex_it = finite_vertices_begin();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue