fix #117766: Crash if first measure of score is part of a

multi measure rest and is edited.
This commit is contained in:
heuchi 2016-07-10 21:27:25 +02:00
parent 3172717cbb
commit 987e722d48

View file

@ -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();