router: fix segfault when placing a via with failed shove of head trace
This commit is contained in:
parent
cb6ea1ed13
commit
cd0031be47
|
@ -454,6 +454,12 @@ bool PNS_LINE_PLACER::rhShoveOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
|||
l.Line().Append( l2.CLine() );
|
||||
l.Line().Simplify();
|
||||
|
||||
if( l.PointCount() == 0 || l2.PointCount() == 0 )
|
||||
{
|
||||
aNewHead = m_head;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_placingVia && viaOk )
|
||||
{
|
||||
PNS_VIA v1( makeVia( l.CPoint( -1 ) ) );
|
||||
|
@ -1037,6 +1043,8 @@ bool PNS_LINE_PLACER::buildInitialLine( const VECTOR2I& aP, PNS_LINE& aHead )
|
|||
{
|
||||
SHAPE_LINE_CHAIN l;
|
||||
|
||||
printf("H-net %d\n", aHead.Net());
|
||||
|
||||
if( m_p_start == aP )
|
||||
{
|
||||
l.Clear();
|
||||
|
|
Loading…
Reference in New Issue