From ef0a8ba524f61e1a267c7e8e7c1e2803afbcad70 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 Apr 2025 20:43:37 -0600 Subject: [PATCH] allow a trigger slot to use an empty region hopefully there are no complications from this :( --- libs/ardour/triggerbox.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index a16466727f..a1d472ca79 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -2470,7 +2470,11 @@ MIDITrigger::setup_event_indices () { RTMidiBufferBeats* rt = rt_midibuffer.load (); - assert (rt->size() > 0); + if (rt->size() == 0) { + first_event_index = 0; + last_event_index = 0; + return; + } if (rt->size() == 1) { first_event_index = 0;