Remove midi-event by iterator, not key -- #7885
With concurrent events removing by key, allowed for invalid iterators.
This commit is contained in:
parent
cbfbe65128
commit
3b65b430aa
@ -676,7 +676,7 @@ Sequence<Time>::end_write (StuckNoteOption option, Time when)
|
|||||||
if (when <= (*n)->time()) {
|
if (when <= (*n)->time()) {
|
||||||
cerr << "WARNING: Stuck note resolution - end time @ "
|
cerr << "WARNING: Stuck note resolution - end time @ "
|
||||||
<< when << " is before note on: " << (**n) << endl;
|
<< when << " is before note on: " << (**n) << endl;
|
||||||
_notes.erase (*n);
|
_notes.erase (n);
|
||||||
} else {
|
} else {
|
||||||
(*n)->set_length (when - (*n)->time());
|
(*n)->set_length (when - (*n)->time());
|
||||||
cerr << "WARNING: resolved note-on with no note-off to generate " << (**n) << endl;
|
cerr << "WARNING: resolved note-on with no note-off to generate " << (**n) << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user