Skip to content

Commit

Permalink
fix #24679: dissallow entering unmapped notes to prevent crashes / we…
Browse files Browse the repository at this point in the history
…ird notation
  • Loading branch information
RomanPudashkin committed Sep 23, 2024
1 parent 4558ed6 commit 2862641
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/engraving/dom/noteentry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ Note* Score::addPitch(NoteVal& nval, bool addFlag, InputState* externalInputStat
track_idx_t track = is.track();
if (is.drumset()) {
const Drumset* ds = is.drumset();
if (!ds->isValid(nval.pitch)) {
return nullptr;
}

nval.headGroup = ds->noteHead(nval.pitch);
stemDirection = ds->stemDirection(nval.pitch);
track = ds->voice(nval.pitch) + (is.track() / VOICES) * VOICES;
Expand Down

0 comments on commit 2862641

Please sign in to comment.