Skip to content

Commit

Permalink
Fix seg fault with syllable used in non neume staves
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Oct 25, 2023
1 parent b519480 commit 9de5929
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/alignfunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,11 @@ FunctorCode AlignHorizontallyFunctor::VisitLayerElement(LayerElement *layerEleme
}
else if (layerElement->Is(SYL)) {
Staff *staff = layerElement->GetAncestorStaff();
if (staff->m_drawingNotationType == NOTATIONTYPE_neume) {
Note *note = vrv_cast<Note *>(layerElement->GetFirstAncestor(NOTE));
if (!note || (staff->m_drawingNotationType == NOTATIONTYPE_neume)) {
type = ALIGNMENT_DEFAULT;
}
else {
Note *note = vrv_cast<Note *>(layerElement->GetFirstAncestor(NOTE));
assert(note);
layerElement->SetAlignment(note->GetAlignment());
}
}
Expand Down

0 comments on commit 9de5929

Please sign in to comment.