diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ad9cf91e4f..8a936af53c 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5334,8 +5334,9 @@ Editor::region_view_added (RegionView * rv) list > >::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 notes ((*rnote).second); selection->pending_midi_note_selection.erase(rnote); + mrv->select_notes (notes, false); // NB. this may change the selection break; } }