From aaffd0c137f0ed7ee69ca9044babf9b56b107df5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 7 May 2021 10:35:00 +0200 Subject: [PATCH] Pcbnew: fix crash due to a not tested null pointer. Fixes #8369 https://gitlab.com/kicad/code/kicad/issues/8369 --- pcbnew/tools/pcb_control.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 18d7e0caa6..ee0ee8f68f 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -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(); + if( !picker ) // Happens in footprint wizard + return 0; + // Deactivate other tools; particularly important if another PICKER is currently running Activate();