Skip to content

Commit

Permalink
Merge pull request musescore#26734 from RomanPudashkin/realize_chord_…
Browse files Browse the repository at this point in the history
…symbols_crash

Fix musescore#26650: Crash when realizing chord symbols
  • Loading branch information
mike-spa authored and RomanPudashkin committed Feb 26, 2025
1 parent 1a1eb16 commit 58c994e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engraving/dom/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4300,6 +4300,12 @@ void Score::cmdRealizeChordSymbols(bool literal, Voicing voicing, HDuration dura
note->setNval(nval, tick);
}

if (!seg->isChordRestType()) {
Segment* newCrSeg = seg->measure()->undoGetSegment(SegmentType::ChordRest, seg->tick());
newCrSeg->setTicks(seg->ticks());
seg = newCrSeg;
}

setChord(this, seg, h->track(), chord, duration); //add chord using template
delete chord;
}
Expand Down

0 comments on commit 58c994e

Please sign in to comment.