mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Don’t use invalid iterator during cleanup. fixes #6403
This commit is contained in:
parent
466af2a80b
commit
9e2048decf
1 changed files with 3 additions and 1 deletions
|
|
@ -2888,6 +2888,8 @@ Session::cleanup_sources (CleanupReport& rep)
|
|||
in the region list.
|
||||
*/
|
||||
|
||||
std::string fpath = i->second->name ();
|
||||
|
||||
RegionFactory::remove_regions_using_source (i->second);
|
||||
sources.erase (i);
|
||||
|
||||
|
|
@ -2895,7 +2897,7 @@ Session::cleanup_sources (CleanupReport& rep)
|
|||
|
||||
for (set<string>::iterator j = all_sources.begin(); j != all_sources.end(); ++j) {
|
||||
spath = Glib::path_get_basename (*j);
|
||||
if ( spath == i->second->name () ) {
|
||||
if ( spath == fpath ) {
|
||||
all_sources.erase (j);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue