Don't crash when loading bitmaps before settings exist

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7900
This commit is contained in:
Jon Evans 2021-03-13 09:54:07 -05:00
parent a79974fb92
commit e38fe842e2
2 changed files with 2 additions and 2 deletions

View File

@ -170,7 +170,7 @@ bool BITMAP_STORE::ThemeChanged()
wxString oldTheme = m_theme;
if( ADVANCED_CFG::GetCfg().m_AllowDarkMode )
if( ADVANCED_CFG::GetCfg().m_AllowDarkMode && settings )
{
switch( settings->m_Appearance.icon_theme )
{

View File

@ -583,7 +583,7 @@ void PGM_BASE::SaveCommonSettings()
COMMON_SETTINGS* PGM_BASE::GetCommonSettings() const
{
return GetSettingsManager().GetCommonSettings();
return m_settings_manager ? GetSettingsManager().GetCommonSettings() : nullptr;
}