avoid possible iterator corruption in MIDI region selection handling
This commit is contained in:
parent
a2b1482cad
commit
985eb93674
@ -1683,12 +1683,15 @@ Editor::select_all_internal_edit (Selection::Operation)
|
||||
{
|
||||
bool selected = false;
|
||||
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ) {
|
||||
RegionSelection::iterator tmp = i;
|
||||
++tmp;
|
||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(*i);
|
||||
if (mrv) {
|
||||
mrv->select_all_notes ();
|
||||
selected = true;
|
||||
}
|
||||
i = tmp;
|
||||
}
|
||||
|
||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(entered_regionview);
|
||||
|
Loading…
Reference in New Issue
Block a user