Browse Source

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
pull/16/head
Seth Hillbrand 6 years ago
parent
commit
3c19704349
  1. 8
      pcbnew/router/router_tool.cpp

8
pcbnew/router/router_tool.cpp

@ -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…
Cancel
Save