From 803675195dcea19913397163564d993e05c195fc Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 31 Jan 2022 16:08:15 -0800 Subject: [PATCH] Be more diligent in preventing drag line errors They can happen even when there are no collisions, so we need to reset the 'ok' flag before using the line again. Fixes https://gitlab.com/kicad/code/kicad/issues/9555 (cherry picked from commit 833ce1922154fcb72da28811b7125d326bbb48bb) --- pcbnew/router/pns_dragger.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/router/pns_dragger.cpp b/pcbnew/router/pns_dragger.cpp index 66547ad349..28cf810abe 100644 --- a/pcbnew/router/pns_dragger.cpp +++ b/pcbnew/router/pns_dragger.cpp @@ -573,6 +573,9 @@ bool DRAGGER::dragWalkaround( const VECTOR2I& aP ) ok = true; } + if( draggedWalk.CLine().PointCount() < 2 ) + ok = false; + if( ok ) { PNS_DBG( Dbg(), AddLine, origLine.CLine(), BLUE, 50000, "drag-orig-line" );