mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
avoid possible iterator corruption in MIDI region selection handling
This commit is contained in:
parent
a2b1482cad
commit
985eb93674
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue