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 8ae304dcca)
This commit is contained in:
Seth Hillbrand 2022-01-28 15:18:05 -08:00
parent c6a8100d46
commit 7277fd6218
1 changed files with 2 additions and 2 deletions

View File

@ -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;