diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc index 136efc94b6..75cfec6da0 100644 --- a/libs/surfaces/generic_midi/midicontrollable.cc +++ b/libs/surfaces/generic_midi/midicontrollable.cc @@ -135,7 +135,7 @@ MIDIControllable::set_controllable (boost::shared_ptr c) return; } - controllable_death_connections.drop_connections (); + controllable_death_connection.disconnect (); if (c) { _controllable = c; @@ -148,9 +148,7 @@ MIDIControllable::set_controllable (boost::shared_ptr c) last_incoming = 256; if (c) { - c->DropReferences.connect (controllable_death_connections, MISSING_INVALIDATOR, - boost::bind (&MIDIControllable::drop_controllable, this), - MidiControlUI::instance()); + c->DropReferences.connect_same_thread (controllable_death_connection, boost::bind (&MIDIControllable::drop_controllable, this)); } } diff --git a/libs/surfaces/generic_midi/midicontrollable.h b/libs/surfaces/generic_midi/midicontrollable.h index 2f80ed9a30..507ef538be 100644 --- a/libs/surfaces/generic_midi/midicontrollable.h +++ b/libs/surfaces/generic_midi/midicontrollable.h @@ -134,7 +134,7 @@ private: int midi_msg_id; /* controller ID or note number */ PBD::ScopedConnection midi_sense_connection[2]; PBD::ScopedConnection midi_learn_connection; - PBD::ScopedConnectionList controllable_death_connections; + PBD::ScopedConnection controllable_death_connection; /** the type of MIDI message that is used for this control */ MIDI::eventType control_type; MIDI::byte control_additional;