Check for tool manager before dereference

Changing common settings in EDA_BASE_FRAME may segfault for frames that
don't implement tool manager yet (simulator)

Fixes: lp:1849492
* https://bugs.launchpad.net/kicad/+bug/1849492
This commit is contained in:
Seth Hillbrand 2019-10-23 06:44:22 -07:00
parent 4004c733c8
commit a934fa49aa
1 changed files with 2 additions and 1 deletions

View File

@ -393,7 +393,8 @@ void EDA_BASE_FRAME::ShowChangedLanguage()
void EDA_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
{
GetToolManager()->GetActionManager()->UpdateHotKeys( false );
if( GetToolManager() )
GetToolManager()->GetActionManager()->UpdateHotKeys( false );
if( GetMenuBar() )
{