Don't choke on degenerate polygons.

It's a bit late to be asserting during drawing.
We'd need to know how the object was created to
do anything about it.
This commit is contained in:
Jeff Young
2025-07-02 21:06:12 -06:00
parent 04e38d3fcd
commit 8dc62e1db5
+2 -1
View File
@@ -1460,7 +1460,8 @@ void OPENGL_GAL::DrawPolygon( const SHAPE_POLY_SET& aPolySet, bool aStrokeTriang
void OPENGL_GAL::DrawPolygon( const SHAPE_LINE_CHAIN& aPolygon )
{
wxCHECK( aPolygon.PointCount() >= 2, /* void */ );
if( aPolygon.PointCount() < 2 )
return;
const int pointCount = aPolygon.SegmentCount() + 1;
std::unique_ptr<GLdouble[]> points( new GLdouble[3 * pointCount] );