13
0

do not delete MIDIControllable* when dealing with pending MIDI Control requests - the MIDIControllable belongs to the surface code in controllables

This commit is contained in:
Paul Davis 2016-07-21 13:42:11 -04:00
parent bd80b2f144
commit 3bf7c4ef49

View File

@ -330,7 +330,6 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
++ptmp;
if (((*i)->first)->get_controllable() == c) {
(*i)->second.disconnect();
delete (*i)->first;
delete *i;
pending_controllables.erase (i);
}
@ -349,6 +348,7 @@ GenericMidiControlProtocol::start_learning (Controllable* c)
if (!mc) {
mc = new MIDIControllable (this, *_input_port->parser(), *c, false);
controllables.push_back (mc);
}
{