diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-03 21:39:59 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-12-03 21:39:59 +0000 |
commit | 1feaa65d167e59b400b8ac003f69e33934ee7c08 (patch) | |
tree | 39de0c876614bed13443e7efd7ea7e82e7795af9 /libs/midi++2 | |
parent | 159b8face74f8ba8da5e1e4225aed0c384ac9dc2 (diff) |
do not try to write from JackMIDIPort::write() if we are disconnected from JACK. should fix erroneous behaviour when MMC tries to send stop messages after JACK disconnects
git-svn-id: svn://localhost/ardour2/branches/3.0@13594 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2')
-rw-r--r-- | libs/midi++2/jack_midi_port.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/midi++2/jack_midi_port.cc b/libs/midi++2/jack_midi_port.cc index 10274ad859..ff26a84e4b 100644 --- a/libs/midi++2/jack_midi_port.cc +++ b/libs/midi++2/jack_midi_port.cc @@ -214,6 +214,13 @@ JackMIDIPort::write (const byte * msg, size_t msglen, timestamp_t timestamp) { int ret = 0; + if (!_jack_client || !_jack_port) { + /* poof ! make it just vanish into thin air, since we are no + longer connected to JACK. + */ + return msglen; + } + if (!sends_output()) { return ret; } |