Attempt to escape from MacOS menubar crashbug.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16738
This commit is contained in:
Jeff Young 2024-01-26 18:30:05 +00:00
parent 89f8c5d918
commit 3fde08f711
1 changed files with 7 additions and 0 deletions

View File

@ -408,6 +408,13 @@ void ACTION_MENU::OnMenuEvent( wxMenuEvent& aEvent )
wxWindow* focus = wxWindow::FindFocus();
TOOL_MANAGER* toolMgr = getToolManager();
if( !toolMgr )
{
wxFAIL_MSG( "ACTION_MENU event fired, but there's no TOOL_MANAGER!" );
aEvent.Skip();
return;
}
if( type == wxEVT_MENU_OPEN )
{
if( m_dirty && toolMgr )