summaryrefslogtreecommitdiff
path: root/libs/surfaces/faderport8
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaces/faderport8')
-rw-r--r--libs/surfaces/faderport8/faderport8.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc
index 923f635324..50d8a213b0 100644
--- a/libs/surfaces/faderport8/faderport8.cc
+++ b/libs/surfaces/faderport8/faderport8.cc
@@ -150,6 +150,9 @@ FaderPort8::~FaderPort8 ()
if (_input_port) {
DEBUG_TRACE (DEBUG::FaderPort8, string_compose ("unregistering input port %1\n", boost::shared_ptr<ARDOUR::Port>(_input_port)->name()));
+ _input_port->disconnect_all ();
+ _input_port->drain (5000, 50000);
+ _input_port->clear ();
AudioEngine::instance()->unregister_port (_input_port);
_input_port.reset ();
}
@@ -461,7 +464,7 @@ FaderPort8::midi_input_handler (Glib::IOCondition ioc, boost::weak_ptr<ARDOUR::A
{
boost::shared_ptr<AsyncMIDIPort> port (wport.lock());
- if (!port) {
+ if (!port || !_input_port) {
return false;
}