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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user