alternative fix for the same problem that 9e2048decf was addressing

This commit is contained in:
Paul Davis
2015-07-02 14:15:11 -04:00
parent aaab192436
commit b8b5d0b4c7

View File

@@ -2888,20 +2888,19 @@ 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);
// also remove source from all_sources
for (set<string>::iterator j = all_sources.begin(); j != all_sources.end(); ++j) {
spath = Glib::path_get_basename (*j);
if ( spath == fpath ) {
if (spath == i->second->name()) {
all_sources.erase (j);
break;
}
}
sources.erase (i);
}
}
}