13
0

Avoid dereferencing invalidated iterator when removing selected regions. Fixes bug 1703.

git-svn-id: svn://localhost/ardour2/trunk@2443 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry 2007-09-10 00:06:58 +00:00
parent 43f23ee971
commit 6d9e73fbb7

View File

@ -178,8 +178,8 @@ Editor::remove_selected_regions ()
/* XXX: should be called remove regions if we're removing more than one */
begin_reversible_command (_("remove region"));
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
boost::shared_ptr<Region> region = (*i)->region ();
while (!selection->regions.empty()) {
boost::shared_ptr<Region> region = selection->regions.front()->region ();
boost::shared_ptr<Playlist> playlist = region->playlist ();
XMLNode &before = playlist->get_state();