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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user