From 03d372a0ec181fecad432fe9c2bff92e945b3f2e Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Tue, 6 Sep 2016 16:40:40 +0200 Subject: [PATCH] Fixed an assertion triggered upon line simplification (PNS). --- pcbnew/router/pns_line_placer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 68dd55b555..762fbbaae7 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -697,7 +697,7 @@ void LINE_PLACER::splitAdjacentSegments( NODE* aNode, ITEM* aSeg, const VECTOR2I return; SEGMENT* s_old = static_cast( aSeg ); - + std::unique_ptr< SEGMENT > s_new[2] = { Clone( *s_old ), Clone( *s_old ) @@ -992,10 +992,9 @@ void LINE_PLACER::simplifyNewLine( NODE* aNode, SEGMENT* aLatest ) if( simplified.PointCount() != l.PointCount() ) { - LINE lnew( l ); aNode->Remove( l ); - lnew.SetShape( simplified ); - aNode->Add( lnew ); + l.SetShape( simplified ); + aNode->Add( l ); } }