diff --git a/src/doc.cpp b/src/doc.cpp index e79a92b74b0..e1dc8fb97de 100644 --- a/src/doc.cpp +++ b/src/doc.cpp @@ -1291,6 +1291,9 @@ void Doc::ConvertToCastOffMensuralDoc(bool castOff) m_isMensuralMusicOnly = false; } + // Calling Doc::PrepareData is expected to collect visible scores + assert(m_dataPreparationDone); + // Make sure the document is not cast-off this->UnCastOffDoc(); diff --git a/src/iohumdrum.cpp b/src/iohumdrum.cpp index 4353e83816a..be58d5bb7ca 100644 --- a/src/iohumdrum.cpp +++ b/src/iohumdrum.cpp @@ -31612,6 +31612,7 @@ void HumdrumInput::finalizeDocument(Doc *doc) if (m_mens) { doc->SetMensuralMusicOnly(true); doc->m_notationType = NOTATIONTYPE_mensural; + doc->PrepareData(); doc->ConvertToCastOffMensuralDoc(true); } }