diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index f8604703..64ac470b 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -2191,17 +2191,8 @@ bool CMeterWindow::ReadSkin() prevMeter = meter; } - // Initialize measures. Separate loop to avoid errors caused by - // referencing nonexistent [measures] in the measure options. - for (auto iter = measures.cbegin(); iter != measures.cend(); ++iter) - { - CMeasure* measure = *iter; - measure->ReadOptions(m_Parser); - measure->Initialize(); - } - - // Initialize meters. Separate loop to avoid errors caused by referencing - // nonexistent [Measures:] in the meter options. (Dynamic Section Variables) + // Initialize meters. Separate loop to avoid errors caused with section + // variables for nonexistent measures/meters. for (auto iter = meters.cbegin(); iter != meters.cend(); ++iter) { CMeter* meter = *iter; @@ -2214,6 +2205,15 @@ bool CMeterWindow::ReadSkin() } } + // Initialize measures. Separate loop to avoid errors caused by + // referencing nonexistent [measures] in the measure options. + for (auto iter = measures.cbegin(); iter != measures.cend(); ++iter) + { + CMeasure* measure = *iter; + measure->ReadOptions(m_Parser); + measure->Initialize(); + } + if (m_Meters.empty()) { std::wstring text = GetFormattedString(ID_STR_NOMETERSINSKIN, m_FolderPath.c_str(), m_FileName.c_str());