fix crash/memory mgmt during MIDI clip recording

the active notes that are extended by transport rolling are
owned by MidiView::_events, not MidiView::_active_notes, so do not
delete them when cleaning up _active_notes.
This commit is contained in:
Paul Davis
2025-05-13 12:10:37 -06:00
parent 57efff5a1f
commit 18c4040b77

View File

@@ -1647,9 +1647,10 @@ void
MidiView::end_write()
{
if (_active_notes) {
for (unsigned i = 0; i < 128; ++i) {
delete _active_notes[i];
}
/* do not delete individual notes referenced here, because they are
owned by _events. Just delete the container used for active
notes only.
*/
delete [] _active_notes;
}