Skip to content

Commit

Permalink
fix musescore#20365: null-check for measure repeats to be re-created
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPudashkin committed Dec 13, 2023
1 parent 2605b58 commit bc88dc0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/engraving/dom/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6435,9 +6435,11 @@ void Score::undoRemoveElement(EngravingItem* element, bool removeLinked)
Measure* measure = repeat->firstMeasureOfGroup();
size_t staffIdx = repeat->staffIdx();

for (int i = 0; i < repeat->numMeasures(); ++i) {
undoChangeMeasureRepeatCount(measure, 0, staffIdx);
measure = measure->nextMeasure();
if (measure) {
for (int i = 0; i < repeat->numMeasures(); ++i) {
undoChangeMeasureRepeatCount(measure, 0, staffIdx);
measure = measure->nextMeasure();
}
}
}

Expand Down

0 comments on commit bc88dc0

Please sign in to comment.