fix crash when inserting measure before very first mm rest

This commit is contained in:
ws 2013-09-28 12:17:44 +02:00
parent bf25e92264
commit 361ce832e8

View file

@ -1786,7 +1786,8 @@ MeasureBase* Score::insertMeasure(Element::ElementType type, MeasureBase* measur
int idx;
if (measure) {
if (measure->type() == Element::MEASURE && static_cast<Measure*>(measure)->isMMRest()) {
measure = static_cast<Measure*>(measure)->prev()->next();
measure = static_cast<Measure*>(measure)->prev();
measure = measure ? measure->next() : firstMeasure();
deselectAll();
}
tick = measure->tick();