From f575a4897374ead77d54bf1b37e72931d548cb3a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 10 Dec 2024 19:23:52 +0100 Subject: [PATCH] Investigate alleged crash on intel mac --- libs/ardour/bundle.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index 03d24b649d..6eb4b552bb 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -676,10 +676,12 @@ Bundle::overall_channel_to_type (DataType t, uint32_t c) const Glib::Threads::Mutex::Lock lm (_channel_mutex); + assert (_channel.size () > c); + uint32_t s = 0; vector::const_iterator i = _channel.begin (); - for (uint32_t j = 0; j < c; ++j) { + for (uint32_t j = 0; j < c && i != _channel.end (); ++j) { if (i->type == t) { ++s; }