mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
assure midi patch ID is set before assigning it
This commit is contained in:
parent
38b32414ba
commit
23f285f126
1 changed files with 2 additions and 1 deletions
|
|
@ -1252,7 +1252,7 @@ MidiModel::PatchChangePtr
|
|||
MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
|
||||
{
|
||||
XMLProperty* prop;
|
||||
Evoral::event_id_t id;
|
||||
Evoral::event_id_t id = 0;
|
||||
Evoral::MusicalTime time = 0;
|
||||
int channel = 0;
|
||||
int program = 0;
|
||||
|
|
@ -1284,6 +1284,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
|
|||
}
|
||||
|
||||
PatchChangePtr p (new Evoral::PatchChange<TimeType> (time, channel, program, bank));
|
||||
assert(id);
|
||||
p->set_id (id);
|
||||
return p;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue