Skip to content
Snippets Groups Projects
Commit 89ed0974 authored by dsa-t's avatar dsa-t
Browse files

Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.

Fixes #17351

(cherry picked from commit b56ee20e)
parent ddec1d53
No related branches found
No related tags found
Loading
Pipeline #1214232825 passed
......@@ -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++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment