From 7277fd6218212ec40de9f54c3bc4e1b3579c3bb6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 28 Jan 2022 15:18:05 -0800 Subject: [PATCH] Don't allow degenerate lines in dragger If walkaround returns an invalid line, don't consider it for a track Fixes https://gitlab.com/kicad/code/kicad/issues/9555 (cherry picked from commit 8ae304dcca1f2e44073d7669699c5c894ef77ebb) --- pcbnew/router/pns_dragger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/router/pns_dragger.cpp b/pcbnew/router/pns_dragger.cpp index e7a4f8ea22..afcdf8d133 100644 --- a/pcbnew/router/pns_dragger.cpp +++ b/pcbnew/router/pns_dragger.cpp @@ -511,12 +511,12 @@ bool DRAGGER::tryWalkaround( NODE* aNode, LINE& aOrig, LINE& aWalk ) wr.lineCcw ); ok = true; } - else if( wr.statusCw == WALKAROUND::DONE ) + else if( wr.statusCw == WALKAROUND::DONE && wr.lineCw.CLine().PointCount() > 1 ) { aWalk = wr.lineCw; ok = true; } - else if( wr.statusCcw == WALKAROUND::DONE ) + else if( wr.statusCcw == WALKAROUND::DONE && wr.lineCcw.CLine().PointCount() > 1 ) { aWalk = wr.lineCcw; ok = true;