Browse Source

Don't crash when loading bitmaps before settings exist

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7900
6.0.7
Jon Evans 5 years ago
parent
commit
e38fe842e2
  1. 2
      common/bitmap_store.cpp
  2. 2
      common/pgm_base.cpp

2
common/bitmap_store.cpp

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

2
common/pgm_base.cpp

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

Loading…
Cancel
Save