Skip to content

Commit

Permalink
fix #288383: Crash when inserting notes in voice 2 when first rest is…
Browse files Browse the repository at this point in the history
… deleted
  • Loading branch information
mattmcclinch committed Apr 29, 2019
1 parent 82f27b7 commit a4fac81
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libmscore/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,14 @@ Segment* InputState::nextInputPos() const
Measure* m = _segment->measure();
Segment* s = _segment->next1(SegmentType::ChordRest);
for (; s; s = s->next1(SegmentType::ChordRest)) {
if (s->element(_track) || s->measure() != m) {
if (s->element(_track)) {
if (s->element(_track)->isRest() && toRest(s->element(_track))->isGap())
continue;
}
return s;
if (s->element(_track)) {
if (s->element(_track)->isRest() && toRest(s->element(_track))->isGap())
m = s->measure();
else
return s;
}
else if (s->measure() != m)
return s;
}
return 0;
}
Expand Down

0 comments on commit a4fac81

Please sign in to comment.