From 45bdde41b3fd451befbdedaba363536820be01e1 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 26 Aug 2025 12:41:54 -0700 Subject: [PATCH] JP's patch to fix crash in routing empty board (cherry picked from commit 8592b2ee702ad45276b53c11f557ce81a4d19aa8) --- pcbnew/router/pns_line_placer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 5fecfd89a8..091afd3cde 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -1501,10 +1501,7 @@ bool LINE_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem ) current = Trace(); - if( !current.PointCount() ) - return false; - - VECTOR2I splitPoint = current.CLine().CPoint( -1 ); + VECTOR2I splitPoint = current.PointCount() ? current.CLine().CLastPoint() : m_p_start; if( reachesEnd && aEndItem && current.SegmentCount() && aEndItem->OfKind( ITEM::SEGMENT_T ) ) {