diff --git a/include/geometry/shape_poly_set.h b/include/geometry/shape_poly_set.h index 57a6dc9a6f..17c1d2d1b6 100644 --- a/include/geometry/shape_poly_set.h +++ b/include/geometry/shape_poly_set.h @@ -165,7 +165,9 @@ class SHAPE_POLY_SET : public SHAPE operator bool() const { - return m_currentPolygon <= m_lastPolygon; + return ( ( m_currentPolygon < m_lastPolygon ) || + ( m_currentPolygon == m_lastPolygon && + m_currentVertex < m_poly->CPolygon( m_currentPolygon )[0].PointCount() ) ); } /**