From 690c02c31a000439cf8b80acd6e96e68974c1b93 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 6 Jun 2017 16:31:00 -0400 Subject: [PATCH] don't crash when recording due to null midi_write_source --- libs/ardour/disk_writer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/disk_writer.cc b/libs/ardour/disk_writer.cc index 1fd5e02d82..2b38e0a239 100644 --- a/libs/ardour/disk_writer.cc +++ b/libs/ardour/disk_writer.cc @@ -538,7 +538,9 @@ DiskWriter::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, capture_start_frame = loop_start; } - _midi_write_source->mark_write_starting_now (capture_start_frame, capture_captured, loop_length); + if (_midi_write_source) { + _midi_write_source->mark_write_starting_now (capture_start_frame, capture_captured, loop_length); + } g_atomic_int_set(const_cast (&_frames_pending_write), 0); g_atomic_int_set(const_cast (&_num_captured_loops), 0);