Add some safety around event-driven menubar recreation

Maybe addresses sentry KICAD-PC
This commit is contained in:
Jon Evans 2024-01-24 23:30:34 -05:00
parent 3ef16221fe
commit bfbf000f60
1 changed files with 3 additions and 2 deletions

View File

@ -483,9 +483,10 @@ void EDA_BASE_FRAME::ReCreateMenuBar()
* ensure that they do not occur within the same event handling call stack.
*/
CallAfter( [=]()
CallAfter( [&]()
{
doReCreateMenuBar();
if( !m_isClosing )
doReCreateMenuBar();
} );
}