libedit: Prevent null dereference in popup
Lack of tool manager can happen when the popup is not connected to the main tool. Fixes: lp:1829825 * https://bugs.launchpad.net/kicad/+bug/1829825
This commit is contained in:
parent
e1373d70ae
commit
06b22594ca
|
@ -321,7 +321,9 @@ void ACTION_MENU::OnMenuEvent( wxMenuEvent& aEvent )
|
|||
|
||||
if( type == wxEVT_MENU_OPEN && m_Dirty )
|
||||
{
|
||||
getToolManager()->RunAction( ACTIONS::updateMenu, true, this );
|
||||
if( m_tool )
|
||||
getToolManager()->RunAction( ACTIONS::updateMenu, true, this );
|
||||
|
||||
aEvent.Skip();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue