Footprint chooser frame: fix crash in COMMON_TOOLS::ResetLocalCoords()

The crash was due to a null pointer thta can happens in Footprint chooser,
frame, when hit the space bar if the canvas showing the Fp has the focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20780

(cherry picked from commit 34e49758d0)
This commit is contained in:
jean-pierre charras
2025-04-26 18:24:17 +02:00
parent 753a436183
commit dba149447c
+3
View File
@@ -679,6 +679,9 @@ int COMMON_TOOLS::TogglePolarCoords( const TOOL_EVENT& aEvent )
int COMMON_TOOLS::ResetLocalCoords( const TOOL_EVENT& aEvent )
{
if( !m_frame->GetScreen() ) // Can happen in footprint chooser frame
return 0;
const KIGFX::VC_SETTINGS& vcSettings = m_toolMgr->GetCurrentToolVC();
// Use either the active tool forced cursor position or the general settings