diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-30 02:58:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-30 02:58:57 +0000 |
commit | 59a61c4357b44aa54f03224ae3ba282cf46c0366 (patch) | |
tree | b40443e66a1bee98938f90e8bec90e5c6a1bdaa9 /libs/midi++2 | |
parent | 77cc0f7cc84df5e242898cef0abb7d633de64d8c (diff) |
fix crash caused by closing down JACK but not telling JACK_MidiPorts about it
git-svn-id: svn://localhost/ardour2/branches/3.0@6412 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2')
-rw-r--r-- | libs/midi++2/jack_midiport.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/midi++2/jack_midiport.cc b/libs/midi++2/jack_midiport.cc index 35e9ade1a3..b944a19ea6 100644 --- a/libs/midi++2/jack_midiport.cc +++ b/libs/midi++2/jack_midiport.cc @@ -293,7 +293,7 @@ JACK_MidiPort::get_state () const XMLNode& root (Port::get_state ()); if (_jack_output_port) { - + const char** jc = jack_port_get_connections (_jack_output_port); string connection_string; if (jc) { @@ -305,10 +305,14 @@ JACK_MidiPort::get_state () const } free (jc); } - + if (!connection_string.empty()) { root.add_property ("outbound", connection_string); } + } else { + if (!_outbound_connections.empty()) { + root.add_property ("outbound", _outbound_connections); + } } if (_jack_input_port) { @@ -328,6 +332,10 @@ JACK_MidiPort::get_state () const if (!connection_string.empty()) { root.add_property ("inbound", connection_string); } + } else { + if (!_inbound_connections.empty()) { + root.add_property ("inbound", _inbound_connections); + } } return root; |