Add null check in ROUTER_TOOL::breakTrack()

This commit is contained in:
Jon Evans 2018-02-26 22:15:58 -05:00 committed by Maciej Suminski
parent 4124019f41
commit 0d794b20bb
1 changed files with 3 additions and 1 deletions

View File

@ -840,14 +840,16 @@ int ROUTER_TOOL::RouteDiffPair( const TOOL_EVENT& aEvent )
return mainLoop( PNS::PNS_MODE_ROUTE_DIFF_PAIR );
}
void ROUTER_TOOL::breakTrack()
{
if ( m_startItem->OfKind( PNS::ITEM::SEGMENT_T ) )
if( m_startItem && m_startItem->OfKind( PNS::ITEM::SEGMENT_T ) )
{
m_router->BreakSegment( m_startItem, m_startSnapPoint );
}
}
int ROUTER_TOOL::mainLoop( PNS::ROUTER_MODE aMode )
{
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();