diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc index 6707465c44..d0e9882aeb 100644 --- a/libs/ardour/midi_buffer.cc +++ b/libs/ardour/midi_buffer.cc @@ -442,15 +442,15 @@ MidiBuffer::merge_in_place (const MidiBuffer &other) return true; } + if (size() + other.size() > _capacity) { + return false; + } + if (size() == 0) { copy (other); return true; } - if (size() + other.size() > _capacity) { - return false; - } - const_iterator them = other.begin(); iterator us = begin();