Make sure we have the property rather than the value of patch change id.
authornick_m <mainsbridge@gmail.com>
Thu, 5 Feb 2015 13:53:12 +0000 (00:53 +1100)
committernick_m <mainsbridge@gmail.com>
Thu, 5 Feb 2015 13:53:12 +0000 (00:53 +1100)
(don't crash whenever someone adds a patch change and reloads the session).

libs/ardour/midi_model.cc

index e3226e036f060efff5dd8113a0c5652d50be8c5b..06ea3076645d7db0fc64707e32fcf42997a0172a 100644 (file)
@@ -1268,7 +1268,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
        }
 
        PatchChangePtr p (new Evoral::PatchChange<TimeType> (time, channel, program, bank));
-       assert(id);
+       assert(n->property ("id"));
        p->set_id (id);
        return p;
 }