From 0d794b20bb5c308183cbd339be7a3dcf8a896d03 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 26 Feb 2018 22:15:58 -0500 Subject: [PATCH] Add null check in ROUTER_TOOL::breakTrack() --- pcbnew/router/router_tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 6e94f39d2a..abf4622f8a 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -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();