diff --git a/common/bitmap_store.cpp b/common/bitmap_store.cpp index 0beeefc3a2..44c1133d06 100644 --- a/common/bitmap_store.cpp +++ b/common/bitmap_store.cpp @@ -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 ) { diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index c12da26d08..bee224d12a 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -583,7 +583,7 @@ void PGM_BASE::SaveCommonSettings() COMMON_SETTINGS* PGM_BASE::GetCommonSettings() const { - return GetSettingsManager().GetCommonSettings(); + return m_settings_manager ? GetSettingsManager().GetCommonSettings() : nullptr; }