From 1937c74191468b4e9e4baa251bb6329a3818d8e4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 3 Aug 2017 19:16:33 +0200 Subject: Ignore cycle-start/end for unregistered ports Should fix a race during Session::destroy(), Port::PortDrop which unregisters ports with the backend, but the actual port instance will still exist. The engine does no longer have a session-pointer and only calls CycleStart(); CycleEnd() to clear port-buffers. Trying to clear and already unregistered Port will crash. --- libs/ardour/midi_port.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/ardour/midi_port.cc') diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index 05d9da5971..9a52aef3c6 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -65,7 +65,7 @@ MidiPort::cycle_start (pframes_t nframes) _buffer->clear (); - if (sends_output ()) { + if (sends_output () && _port_handle) { port_engine.midi_clear (port_engine.get_buffer (_port_handle, nframes)); } -- cgit v1.2.3