From c09fc59ba57991809a67ac852bc9104e774835e4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 12 Jul 2025 16:08:45 +0100 Subject: [PATCH] It's too late to flag these at render time. (And we don't control what kind of nonsense fonts have either.) --- common/gal/cairo/cairo_gal.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index a3a39bd3ea..af20457f13 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -1210,7 +1210,8 @@ void CAIRO_GAL_BASE::blitCursor( wxMemoryDC& clientDC ) void CAIRO_GAL_BASE::drawPoly( const std::deque& aPointList ) { - wxCHECK( aPointList.size() > 1, /* void */ ); + if( aLineChain.PointCount() <= 1 ) + return; // Iterate over the point list and draw the segments std::deque::const_iterator it = aPointList.begin(); @@ -1235,7 +1236,8 @@ void CAIRO_GAL_BASE::drawPoly( const std::deque& aPointList ) void CAIRO_GAL_BASE::drawPoly( const std::vector& aPointList ) { - wxCHECK( aPointList.size() > 1, /* void */ ); + if( aLineChain.PointCount() <= 1 ) + return; // Iterate over the point list and draw the segments std::vector::const_iterator it = aPointList.begin(); @@ -1260,7 +1262,8 @@ void CAIRO_GAL_BASE::drawPoly( const std::vector& aPointList ) void CAIRO_GAL_BASE::drawPoly( const VECTOR2D aPointList[], int aListSize ) { - wxCHECK( aListSize > 1, /* void */ ); + if( aLineChain.PointCount() <= 1 ) + return; // Iterate over the point list and draw the segments const VECTOR2D* ptr = aPointList; @@ -1284,7 +1287,8 @@ void CAIRO_GAL_BASE::drawPoly( const VECTOR2D aPointList[], int aListSize ) void CAIRO_GAL_BASE::drawPoly( const SHAPE_LINE_CHAIN& aLineChain ) { - wxCHECK( aLineChain.PointCount() > 1, /* void */ ); + if( aLineChain.PointCount() <= 1 ) + return; syncLineWidth();