diff --git a/pcbnew/footprint_editor_settings.cpp b/pcbnew/footprint_editor_settings.cpp index 7dc7868a34..8746e4028f 100644 --- a/pcbnew/footprint_editor_settings.cpp +++ b/pcbnew/footprint_editor_settings.cpp @@ -422,13 +422,16 @@ bool FOOTPRINT_EDITOR_SETTINGS::migrateSchema0to1() if( !m_manager ) { - wxLogTrace( - traceSettings, "Error: FOOTPRINT_EDITOR_SETTINGS migration cannot run unmanaged!" ); + wxLogTrace( traceSettings, + "Error: FOOTPRINT_EDITOR_SETTINGS migration cannot run unmanaged!" ); return false; } nlohmann::json::json_pointer theme_ptr( "/appearance/color_theme" ); + if( !count( theme_ptr ) ) + return true; + wxString selected = at( theme_ptr ).get(); wxString search = selected + wxT( "_footprints" ); @@ -437,7 +440,7 @@ bool FOOTPRINT_EDITOR_SETTINGS::migrateSchema0to1() if( settings->GetFilename() == search ) { wxLogTrace( traceSettings, "Updating footprint editor theme from %s to %s", - selected, search ); + selected, search ); ( *this )[theme_ptr] = search; return true; }