Pcbnew: fix crash due to a not tested null pointer.
Fixes #8369 https://gitlab.com/kicad/code/kicad/issues/8369
This commit is contained in:
parent
063f26531c
commit
aaffd0c137
|
@ -431,6 +431,9 @@ int PCB_CONTROL::GridSetOrigin( const TOOL_EVENT& aEvent )
|
|||
std::string tool = aEvent.GetCommandStr().get();
|
||||
PCB_PICKER_TOOL* picker = m_toolMgr->GetTool<PCB_PICKER_TOOL>();
|
||||
|
||||
if( !picker ) // Happens in footprint wizard
|
||||
return 0;
|
||||
|
||||
// Deactivate other tools; particularly important if another PICKER is currently running
|
||||
Activate();
|
||||
|
||||
|
|
Loading…
Reference in New Issue