Fix crash when router gets notifed but has no current m_placer.

Fixes https://gitlab.com/kicad/code/kicad/issues/5935
This commit is contained in:
Jeff Young 2020-10-09 14:14:54 +01:00
parent 1fc94c7a2d
commit 1cb0cbff2e
1 changed files with 4 additions and 2 deletions

View File

@ -1637,7 +1637,9 @@ int ROUTER_TOOL::onTrackViaSizeChanged( const TOOL_EVENT& aEvent )
{ {
PNS::SIZES_SETTINGS sizes( m_router->Sizes() ); PNS::SIZES_SETTINGS sizes( m_router->Sizes() );
if( m_router->RoutingInProgress() )
m_iface->ImportSizes( sizes, nullptr, m_router->GetCurrentNets()[0] ); m_iface->ImportSizes( sizes, nullptr, m_router->GetCurrentNets()[0] );
m_router->UpdateSizes( sizes ); m_router->UpdateSizes( sizes );
// Changing the track width can affect the placement, so call the // Changing the track width can affect the placement, so call the