From 549c16796211b17458b9e31e1cc57aef2442b94b Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 19 Mar 1999 22:28:46 +0000 Subject: [PATCH] Only add non-null polygons to output list. --- Clipper/clipper.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Clipper/clipper.cxx b/Clipper/clipper.cxx index 0a10f3276..2f9e4e3ca 100644 --- a/Clipper/clipper.cxx +++ b/Clipper/clipper.cxx @@ -223,7 +223,10 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) { } */ - polys_clipped.polys[i].push_back(result_diff); + // only add to output list if the clip left us with a polygon + if ( result_diff->num_contours > 0 ) { + polys_clipped.polys[i].push_back(result_diff); + } accum = result_union; } } @@ -247,6 +250,9 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) { // $Log$ +// Revision 1.5 1999/03/19 22:28:46 curt +// Only add non-null polygons to output list. +// // Revision 1.4 1999/03/19 00:26:18 curt // Fixed a clipping bug (polygons specified in wrong order). // Touched up a few compiler warnings. -- 2.39.2