mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
Fix #2478; deref of 0 pointer if jack_port_register fails.
git-svn-id: svn://localhost/ardour2/branches/3.0@4328 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d88b950061
commit
058e7f2c01
1 changed files with 6 additions and 2 deletions
|
|
@ -243,7 +243,9 @@ JACK_MidiPort::create_ports(const XMLNode& node)
|
|||
_jack_output_port = jack_port_register(_jack_client,
|
||||
string(desc.tag).append("_out").c_str(),
|
||||
JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0);
|
||||
jack_midi_clear_buffer(jack_port_get_buffer(_jack_output_port, nframes));
|
||||
if (_jack_output_port) {
|
||||
jack_midi_clear_buffer(jack_port_get_buffer(_jack_output_port, nframes));
|
||||
}
|
||||
ret = ret && (_jack_output_port != NULL);
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +253,9 @@ JACK_MidiPort::create_ports(const XMLNode& node)
|
|||
_jack_input_port = jack_port_register(_jack_client,
|
||||
string(desc.tag).append("_in").c_str(),
|
||||
JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
|
||||
jack_midi_clear_buffer(jack_port_get_buffer(_jack_input_port, nframes));
|
||||
if (_jack_input_port) {
|
||||
jack_midi_clear_buffer(jack_port_get_buffer(_jack_input_port, nframes));
|
||||
}
|
||||
ret = ret && (_jack_input_port != NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue