Skip to content

Commit

Permalink
fix #308064: assertion failure on empty nashville number
Browse files Browse the repository at this point in the history
Resolves: https://musescore.org/en/node/308064

Playback of Nashville numbers was not handling empty elements
(for example, when hitting space without typing anything).
Fixed to check for this and skip realization.
  • Loading branch information
MarcSabatella committed Jul 19, 2020
1 parent 0c1e286 commit 2c02b29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions libmscore/harmony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,7 @@ const RealizedHarmony& Harmony::getRealizedHarmony()
offset = interval.chromatic;

//Adjust for Nashville Notation, might be temporary
// TODO: set dirty on add/remove of keysig
if (_harmonyType == HarmonyType::NASHVILLE && !_realizedHarmony.valid()) {
Key key = staff()->key(tick());
//parse root
Expand Down
3 changes: 2 additions & 1 deletion libmscore/realizedharmony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ void RealizedHarmony::update(int rootTpc, int bassTpc, int transposeOffset /*= 0
return;
}

_notes = generateNotes(rootTpc, bassTpc, _literal, _voicing, transposeOffset);
if (tpcIsValid(rootTpc))
_notes = generateNotes(rootTpc, bassTpc, _literal, _voicing, transposeOffset);
_dirty = false;
}

Expand Down

0 comments on commit 2c02b29

Please sign in to comment.