From c7745ffd4333e2bcdbfc12a636f709834ab63981 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 4 Oct 2023 15:12:31 +0200 Subject: [PATCH] Double check our assumptions when merging MIDI --- libs/ardour/midi_region.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index cdfe8fe57b..697df1fa35 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -570,6 +570,8 @@ MidiRegion::merge (std::shared_ptr other_region) * self->position <= other->position () */ + assert (position() <= other_region->position ()); + while ((e1 != self->end ()) || (e2 != other->end ())) { /* map time from other region to this region */ Temporal::Beats e2t;