Skip to content

Commit

Permalink
Merge pull request #4388 from dmitrio95/278485-insertmeasure-crash
Browse files Browse the repository at this point in the history
fix #278485: fix a crash on inserting measures before boxes
  • Loading branch information
anatoly-os committed Dec 13, 2018
2 parents f11685c + 065e84f commit f629358
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libmscore/edit.cpp
Expand Up @@ -2660,7 +2660,13 @@ void Score::insertMeasure(ElementType type, MeasureBase* measure, bool createEmp
if (type == ElementType::MEASURE) {
Measure* m = toMeasure(mb); // new measure
ticks = m->ticks();
Measure* mi = toMeasure(im); // insert before
Measure* mi = nullptr; // insert before
if (im) {
if (im->isMeasure())
mi = toMeasure(im);
else
mi = score->tick2measure(im->tick());
}

if (score->isMaster())
om = m;
Expand Down

0 comments on commit f629358

Please sign in to comment.