Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17351
(cherry picked from commit b56ee20e22
)
This commit is contained in:
parent
ddec1d5317
commit
89ed09744b
|
@ -1274,9 +1274,9 @@ bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_
|
|||
if( !layers[ layer ] )
|
||||
continue;
|
||||
|
||||
for( int outline = 0; outline < poly->OutlineCount(); outline++ )
|
||||
for( int polyId = 0; polyId < poly->TriangulatedPolyCount(); polyId++ )
|
||||
{
|
||||
const SHAPE_POLY_SET::TRIANGULATED_POLYGON* tri = poly->TriangulatedPolygon( outline );
|
||||
const SHAPE_POLY_SET::TRIANGULATED_POLYGON* tri = poly->TriangulatedPolygon( polyId );
|
||||
|
||||
for( size_t i = 0; i < tri->GetTriangleCount(); i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue