diff --git a/pcbnew/router/pns_dragger.cpp b/pcbnew/router/pns_dragger.cpp index afcdf8d133..66547ad349 100644 --- a/pcbnew/router/pns_dragger.cpp +++ b/pcbnew/router/pns_dragger.cpp @@ -504,12 +504,19 @@ bool DRAGGER::tryWalkaround( NODE* aNode, LINE& aOrig, LINE& aWalk ) WALKAROUND::RESULT wr = walkaround.Route( aWalk ); - if( wr.statusCcw == WALKAROUND::DONE && wr.statusCw == WALKAROUND::DONE ) { - aWalk = ( wr.lineCw.CLine().Length() < wr.lineCcw.CLine().Length() ? wr.lineCw : - wr.lineCcw ); - ok = true; + if( wr.lineCw.CLine().PointCount() > 1 + && wr.lineCw.CLine().Length() < wr.lineCcw.CLine().Length() ) + { + aWalk = wr.lineCw; + ok = true; + } + else if( wr.lineCcw.CLine().PointCount() > 1 ) + { + aWalk = wr.lineCcw; + ok = true; + } } else if( wr.statusCw == WALKAROUND::DONE && wr.lineCw.CLine().PointCount() > 1 ) { @@ -521,6 +528,7 @@ bool DRAGGER::tryWalkaround( NODE* aNode, LINE& aOrig, LINE& aWalk ) aWalk = wr.lineCcw; ok = true; } + return ok; }