Skip to content

Commit

Permalink
Fix crash when converting mensural notation from Humdrum
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Dec 19, 2023
1 parent 74a35fd commit 3ded68c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 1 addition & 0 deletions src/iohumdrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 3ded68c

Please sign in to comment.