Don't crash when loading bitmaps before settings exist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7900
This commit is contained in:
parent
a79974fb92
commit
e38fe842e2
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -583,7 +583,7 @@ void PGM_BASE::SaveCommonSettings()
|
|||
|
||||
COMMON_SETTINGS* PGM_BASE::GetCommonSettings() const
|
||||
{
|
||||
return GetSettingsManager().GetCommonSettings();
|
||||
return m_settings_manager ? GetSettingsManager().GetCommonSettings() : nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue