Nullptr safety.

(This is a long shot for Sentry KICAD-MV, but you never know....)
This commit is contained in:
Jeff Young 2023-04-03 17:45:30 +01:00
parent d135295ac8
commit a4e8fa96d4
1 changed files with 31 additions and 23 deletions

View File

@ -606,9 +606,12 @@ APP_SETTINGS_BASE* FOOTPRINT_EDIT_FRAME::config() const
void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
{
// aCfg will be the PCBNEW_SETTINGS
// Get our own settings; aCfg will be the PCBNEW_SETTINGS because we're part of the pcbnew
// compile unit
FOOTPRINT_EDITOR_SETTINGS* cfg = GetSettings();
if( cfg )
{
PCB_BASE_FRAME::LoadSettings( cfg );
GetDesignSettings() = cfg->m_DesignSettings;
@ -619,6 +622,7 @@ void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
GetToolManager()->GetTool<PCB_SELECTION_TOOL>()->GetFilter() = cfg->m_SelectionFilter;
m_selectionFilterPanel->SetCheckboxesFromFilter( cfg->m_SelectionFilter );
}
}
@ -626,9 +630,12 @@ void FOOTPRINT_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
{
GetGalDisplayOptions().m_axesEnabled = true;
// aCfg will be the PCBNEW_SETTINGS
// Get our own settings; aCfg will be the PCBNEW_SETTINGS because we're part of the pcbnew
// compile unit
FOOTPRINT_EDITOR_SETTINGS* cfg = GetSettings();
if( cfg )
{
PCB_BASE_FRAME::SaveSettings( cfg );
cfg->m_DesignSettings = GetDesignSettings();
@ -647,6 +654,7 @@ void FOOTPRINT_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
cfg->m_AuiPanels.properties_splitter_proportion =
m_propertiesPanel->SplitterProportion();
}
}