X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Clipper%2Fclipper.cxx;h=2f9e4e3ca827ccb210ae971f85959b40dd1e2898;hb=549c16796211b17458b9e31e1cc57aef2442b94b;hp=0a10f32768f7ad3ea5f0e9053e62151a9e5e92a3;hpb=44550e6b70a80574c7a56a96e6ed4e2a4ab32e88;p=flightgear.git 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.