7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 22:31:40 +00:00

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

(there is no roter tool in fp editor)
Fixes 
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

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