LIB_TREE::onHoverTimer() fix crash in Footprint Chooser dialog, due to

a pointer that can be null, when called from Change Footprints dialog.
Fixes #16556
https://gitlab.com/kicad/code/kicad/-/issues/16556
This commit is contained in:
jean-pierre charras 2024-01-09 15:49:23 +01:00
parent 9c05b61d7b
commit 6659cec5e0
1 changed files with 2 additions and 1 deletions

View File

@ -755,7 +755,8 @@ void LIB_TREE::onHoverTimer( wxTimerEvent& aEvent )
TOOL_DISPATCHER* toolDispatcher = m_adapter->GetToolDispatcher();
if( !m_tree_ctrl->IsShownOnScreen() || m_previewDisabled || toolDispatcher->GetCurrentMenu() )
if( !m_tree_ctrl->IsShownOnScreen() || m_previewDisabled
|| ( toolDispatcher && toolDispatcher->GetCurrentMenu() ) )
return;
wxDataViewItem item;