summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_model.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-03-23 01:14:36 +0100
committerRobin Gareus <robin@gareus.org>2014-03-23 01:14:36 +0100
commit23f285f126c30a7964a510c12caeff3b7509b04a (patch)
tree55d18160ce06069390f72685551e3d82de9ae2bc /libs/ardour/midi_model.cc
parent38b32414babf2c0007d799a208e7a61a56c334fd (diff)
assure midi patch ID is set before assigning it
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r--libs/ardour/midi_model.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc
index 716d511798..ef9544589d 100644
--- a/libs/ardour/midi_model.cc
+++ b/libs/ardour/midi_model.cc
@@ -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;
}