Attempt to escape from MacOS menubar crashbug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16738
This commit is contained in:
parent
89f8c5d918
commit
3fde08f711
|
@ -408,6 +408,13 @@ void ACTION_MENU::OnMenuEvent( wxMenuEvent& aEvent )
|
||||||
wxWindow* focus = wxWindow::FindFocus();
|
wxWindow* focus = wxWindow::FindFocus();
|
||||||
TOOL_MANAGER* toolMgr = getToolManager();
|
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( type == wxEVT_MENU_OPEN )
|
||||||
{
|
{
|
||||||
if( m_dirty && toolMgr )
|
if( m_dirty && toolMgr )
|
||||||
|
|
Loading…
Reference in New Issue