fix crash when inserting measure before very first mm rest
This commit is contained in:
parent
bf25e92264
commit
361ce832e8
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue