Skip to content

Commit

Permalink
Fix crash on lyrics line layout
Browse files Browse the repository at this point in the history
Backport of musescore#19972, commit 38
  • Loading branch information
mike-spa authored and Jojo-Schmitz committed Nov 16, 2023
1 parent 9869614 commit 7604a87
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libmscore/layout.cpp
Expand Up @@ -4659,8 +4659,11 @@ void Score::layoutSystemElements(System* system, LayoutContext& lc)

layoutLyrics(system);

// here are lyrics dashes and melisma
for (Spanner* sp : _unmanagedSpanner) {
// Layout lyrics dashes and melisma
// NOTE: loop on a *copy* of unmanagedSpanners because in some cases
// the underlying operation may invalidate some of the iterators.
std::set<Spanner*> unmanagedSpanners = _unmanagedSpanner;
for (Spanner* sp : unmanagedSpanners) {
if (sp->tick() >= etick || sp->tick2() <= stick)
continue;
sp->layoutSystem(system);
Expand Down

0 comments on commit 7604a87

Please sign in to comment.