pcbnew: bugfix for "PNS router allocates all memory"

This commit is contained in:
Tomasz Wlostowski 2014-09-16 14:12:59 +02:00 committed by Maciej Suminski
parent d3f15f2146
commit 0cf334a072
1 changed files with 26 additions and 23 deletions

View File

@ -200,6 +200,9 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre,
const VECTOR2I p = ips[i].p; const VECTOR2I p = ips[i].p;
int dist = line.PathLength( p ); int dist = line.PathLength( p );
if( dist < 0 )
return false;
if( dist <= nearest_dist ) if( dist <= nearest_dist )
{ {
nearest_dist = dist; nearest_dist = dist;