summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-14 07:00:50 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-05-14 07:01:01 -0400
commite73b4e6f559edcb13e1baa403d167aec8d3aff5d (patch)
tree2cc4574a92528be6655ced1a1546f1da29fc3561 /libs/ardour/session_state.cc
parent4d2d693190f38697c7354ef4638f7780ea90e938 (diff)
fix cleanup (code is self-evident). From Yevgeny @ waves
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index a387f5d8c0..6c7e7bff0e 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2789,6 +2789,16 @@ Session::cleanup_sources (CleanupReport& rep)
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 == i->second->name () ) {
+ all_sources.erase (j);
+ break;
+ }
+ }
}
}
}