From ba5a9b363eff462f0ef44ef72cfc4a36e52980aa Mon Sep 17 00:00:00 2001 From: Ralf Gerlich Date: Sat, 14 Mar 2009 11:55:01 +0100 Subject: [PATCH] Fred Bouvier: Fix genapts crash in remove_dups due to duplicate points being reduced to an empty polygon. --- src/Lib/Geometry/poly_support.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ];