router: prevent heap crash when initial walkaround line is empty
This commit is contained in:
parent
1a2e02040a
commit
c2b9db293f
|
@ -63,6 +63,8 @@ WALKAROUND::WALKAROUND_STATUS WALKAROUND::singleStep( LINE& aPath,
|
|||
|
||||
SHAPE_LINE_CHAIN path_pre[2], path_walk[2], path_post[2];
|
||||
|
||||
if( aPath.PointCount() > 1 )
|
||||
{
|
||||
VECTOR2I last = aPath.CPoint( -1 );
|
||||
|
||||
if( ( current_obs->m_hull ).PointInside( last ) || ( current_obs->m_hull ).PointOnEdge( last ) )
|
||||
|
@ -77,6 +79,7 @@ WALKAROUND::WALKAROUND_STATUS WALKAROUND::singleStep( LINE& aPath,
|
|||
return DONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aPath.Walkaround( current_obs->m_hull, path_pre[0], path_walk[0],
|
||||
path_post[0], aWindingDirection );
|
||||
|
|
Loading…
Reference in New Issue