router: fix segfault with NPTH holes in COMPONENT_DRAGGER

This commit is contained in:
Tomasz Wlostowski 2020-08-26 23:57:32 +02:00
parent adbd94553d
commit f2338d9faa
2 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,9 @@ bool COMPONENT_DRAGGER::Start( const VECTOR2I& aP, ITEM_SET& aPrimitives )
if( item.item->Kind() != ITEM::SOLID_T )
continue;
if( ! item.item->IsRoutable() )
continue;
auto solid = static_cast<SOLID*>( item.item );
auto jt = m_world->FindJoint( solid->Pos(), solid );

View File

@ -757,6 +757,9 @@ void NODE::removeViaIndex( VIA* aVia )
void NODE::removeSolidIndex( SOLID* aSolid )
{
if( !aSolid->IsRoutable() )
return;
// fixme: redundant code
JOINT* jt = FindJoint( aSolid->Pos(), aSolid->Layers().Start(), aSolid->Net() );
assert( jt );