fp editor: fix crash (null pointer) when trying to drag an item.

(there is no roter tool in fp editor)
Fixes #9476
https://gitlab.com/kicad/code/kicad/issues/9476
This commit is contained in:
jean-pierre charras 2021-10-28 11:51:04 +02:00
parent 4a9b3d9673
commit 1dbe8442b1
1 changed files with 3 additions and 0 deletions

View File

@ -273,6 +273,9 @@ bool EDIT_TOOL::isRouterActive() const
int EDIT_TOOL::Drag( const TOOL_EVENT& aEvent )
{
if( !m_toolMgr->GetTool<ROUTER_TOOL>() )
return false; // don't drag when no router tool (i.e. fp editor)
if( m_toolMgr->GetTool<ROUTER_TOOL>()->IsToolActive() )
return false; // don't drag when router is already active