From 6bef95806ee50c917d9d73ea1520e0b7c573d793 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 20 Oct 2009 22:33:08 +0000 Subject: [PATCH] Fix crash with input (not duplex) control MIDI ports. git-svn-id: svn://localhost/ardour2/branches/3.0@5829 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/midi++2/jack_midiport.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/midi++2/jack_midiport.cc b/libs/midi++2/jack_midiport.cc index 55651f5663..eaccfa6b93 100644 --- a/libs/midi++2/jack_midiport.cc +++ b/libs/midi++2/jack_midiport.cc @@ -44,7 +44,7 @@ JACK_MidiPort::JACK_MidiPort(const XMLNode& node, jack_client_t* jack_client) if (!err) { _ok = true; - } + } } JACK_MidiPort::~JACK_MidiPort() @@ -92,7 +92,9 @@ JACK_MidiPort::cycle_start (nframes_t nframes) void JACK_MidiPort::cycle_end () { - flush(jack_port_get_buffer(_jack_output_port, _nframes_this_cycle)); + if (_jack_output_port != 0) { + flush(jack_port_get_buffer(_jack_output_port, _nframes_this_cycle)); + } } int