13
0

non-crashing version of previous commit

This commit is contained in:
Paul Davis 2024-10-18 09:57:43 -06:00
parent 9f14eea88a
commit 6c14a6c407

View File

@ -1565,10 +1565,12 @@ MidiView::begin_write()
XXX this should not happen.
*/
if (_active_notes) {
for (unsigned i = 0; i < 128; ++i) {
delete _active_notes[i];
}
delete [] _active_notes;
}
/* reallocate */
@ -1585,11 +1587,12 @@ MidiView::begin_write()
void
MidiView::end_write()
{
if (_active_notes) {
for (unsigned i = 0; i < 128; ++i) {
delete _active_notes[i];
}
delete [] _active_notes;
}
_active_notes = nullptr;
_marked_for_selection.clear();