diff --git a/src/Lib/Geometry/poly_support.cxx b/src/Lib/Geometry/poly_support.cxx index d3d425ed..d41d7b70 100644 --- a/src/Lib/Geometry/poly_support.cxx +++ b/src/Lib/Geometry/poly_support.cxx @@ -673,7 +673,7 @@ TGPolygon remove_dups( const TGPolygon &poly ) { // cout << "testing contour " << i << " size = " << contour.size() // << " hole = " << poly.get_hole_flag( i ) << endl; bool have_dups = true; - while ( have_dups ) { + while ( have_dups && contour.size() ) { have_dups = false; new_contour.clear(); Point3D last = contour[ contour.size() - 1 ];