Fix an invalid iterator increment when there are no FreqCal frequencies

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8151 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2017-10-01 21:43:59 +00:00
parent dc9ab1da32
commit c3bacf6b07

View File

@ -6676,7 +6676,8 @@ void MainWindow::on_actionErase_reference_spectrum_triggered()
void MainWindow::freqCalStep()
{
if (++m_frequency_list_fcal_iter == m_config.frequencies ()->end ()) {
if (m_frequency_list_fcal_iter == m_config.frequencies ()->end ()
|| ++m_frequency_list_fcal_iter == m_config.frequencies ()->end ()) {
m_frequency_list_fcal_iter = m_config.frequencies ()->begin ();
}