From d790865549ee9fa7b3534fd9268503cbf69bac68 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 14 May 2023 13:40:14 +0300 Subject: [PATCH] Make sure text bounding box exists when syncing PNS world. Fixes https://gitlab.com/kicad/code/kicad/issues/14733 --- pcbnew/router/pns_kicad_iface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 40096cdf87..cc611d95a1 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -1269,6 +1269,9 @@ bool PNS_KICAD_IFACE_BASE::syncTextItem( PNS::NODE* aWorld, PCB_TEXT* aText, PCB aText->TransformBoundingBoxToPolygon( &cornerBuffer, margin ); + if( !cornerBuffer.OutlineCount() ) + return false; + for( const VECTOR2I& pt : cornerBuffer.Outline( 0 ).CPoints() ) shape->Append( pt );