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

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