Settings: make sure file history size is at least 1

This commit is contained in:
Mike Williams 2024-02-07 08:59:38 -05:00
parent 169114fd07
commit 6125a183b4
1 changed files with 1 additions and 1 deletions

View File

@ -820,7 +820,7 @@ void EDA_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
int fileHistorySize = Pgm().GetCommonSettings()->m_System.file_history_size; int fileHistorySize = Pgm().GetCommonSettings()->m_System.file_history_size;
// Load the recently used files into the history menu // Load the recently used files into the history menu
m_fileHistory = new FILE_HISTORY( (unsigned) std::max( 0, fileHistorySize ), m_fileHistory = new FILE_HISTORY( (unsigned) std::max( 1, fileHistorySize ),
ID_FILE1, ID_FILE_LIST_CLEAR ); ID_FILE1, ID_FILE_LIST_CLEAR );
m_fileHistory->Load( *aCfg ); m_fileHistory->Load( *aCfg );
} }