PNS: Don't add null items to drag
Not all footprint pad items are connected to elements in the PNS, so if we don't find the parent element, we avoid later crashes/assertions by skipping their addition Fixes #3972 | https://gitlab.com/kicad/code/kicad/issues/3972
This commit is contained in:
parent
18db471967
commit
3c19704349
|
@ -1205,13 +1205,17 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
|||
for ( const auto p : mod->Pads() )
|
||||
{
|
||||
auto solid = m_router->GetWorld()->FindItemByParent( p );
|
||||
itemsToDrag.Add( solid );
|
||||
|
||||
if( solid )
|
||||
itemsToDrag.Add( solid );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
startItem = m_router->GetWorld()->FindItemByParent( static_cast<const BOARD_CONNECTED_ITEM*>( item ) );
|
||||
itemsToDrag.Add( startItem );
|
||||
|
||||
if( startItem)
|
||||
itemsToDrag.Add( startItem );
|
||||
}
|
||||
|
||||
if( startItem && startItem->IsLocked() )
|
||||
|
|
Loading…
Reference in New Issue