Skip to content

Commit

Permalink
Fix #320620: Crash when filing with slashes
Browse files Browse the repository at this point in the history
on a certain score (see issue resp. forum topic, from an XML Import), multiple measures including the last.
  • Loading branch information
Jojo-Schmitz authored and vpereverzev committed Apr 29, 2021
1 parent 1401057 commit 9e30ffd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/libmscore/cmd.cpp
Expand Up @@ -3454,13 +3454,15 @@ void Score::cmdSlashFill()
// insert & turn into slash
s = setNoteRest(s, track + voice, nv, f);
Chord* c = toChord(s->element(track + voice));
if (c->links()) {
for (ScoreElement* e : *c->links()) {
Chord* lc = toChord(e);
lc->setSlash(true, true);
if (c) {
if (c->links()) {
for (ScoreElement* e : *c->links()) {
Chord* lc = toChord(e);
lc->setSlash(true, true);
}
} else {
c->setSlash(true, true);
}
} else {
c->setSlash(true, true);
}
lastSlash = c;
if (!firstSlash) {
Expand Down

0 comments on commit 9e30ffd

Please sign in to comment.