Work around crash #8586
MidiRegionView::select_notes() may call MRV::add_to_selection
which may call editor().get_selection().clear ();
This in turn clears the pending_midi_note_selection, invalidating
iterator.
This bug was introduced in 7cf435a876
(6.5.148)
This commit is contained in:
parent
770fd1519c
commit
f8ba27f417
@ -5334,8 +5334,9 @@ Editor::region_view_added (RegionView * rv)
|
||||
list<pair<PBD::ID const, list<Evoral::event_id_t> > >::iterator rnote;
|
||||
for (rnote = selection->pending_midi_note_selection.begin(); rnote != selection->pending_midi_note_selection.end(); ++rnote) {
|
||||
if (rv->region()->id () == (*rnote).first) {
|
||||
mrv->select_notes ((*rnote).second, false);
|
||||
list<Evoral::event_id_t> notes ((*rnote).second);
|
||||
selection->pending_midi_note_selection.erase(rnote);
|
||||
mrv->select_notes (notes, false); // NB. this may change the selection
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user