Browse Source

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
pull/18/head
jean-pierre charras 6 months ago
parent
commit
34e49758d0
  1. 3
      common/tool/common_tools.cpp

3
common/tool/common_tools.cpp

@ -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

Loading…
Cancel
Save