Skip to content

Commit

Permalink
fix #117766: Crash if first measure of score is part of a
Browse files Browse the repository at this point in the history
             multi measure rest and is edited.
  • Loading branch information
heuchi committed Jul 10, 2016
1 parent 3172717 commit 987e722
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libmscore/layout.cpp
Expand Up @@ -3662,6 +3662,14 @@ void Score::doLayoutRange(int stick, int etick)
if (m->prevMeasureMM()) {
m = m->prevMeasureMM();
}

// if the first measure of the score is part of a multi measure rest
// m->system() will return a nullptr. We need to find the multi measure
// rest which replaces the measure range
if (!m->system() && m->hasMMRest())
m = m->mmRest();
Q_ASSERT(m->system());

Page* p = m->system()->page();
System* s = p->systems().front();

Expand Down

0 comments on commit 987e722

Please sign in to comment.