13
0

fix crash when opening a session created before the midnam-channel GUI property existed

This commit is contained in:
Paul Davis 2023-08-20 09:18:25 -06:00
parent 511c3ef048
commit 776d8590f9

View File

@ -471,6 +471,9 @@ PianoRollHeader::get_note_name (int note)
if (mtv) {
string chn = mtv->gui_property (X_("midnam-channel"));
if (!chn.empty()) {
int midnam_channel;
sscanf (chn.c_str(), "%*s %d", &midnam_channel);
@ -482,6 +485,7 @@ PianoRollHeader::get_note_name (int note)
midnam_channel, //channel
note); //note
}
}
int oct_rel = note % 12;
switch(oct_rel) {