13
0

Fix crash on session close.

git-svn-id: svn://localhost/ardour2/branches/3.0@9005 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-03-01 17:39:57 +00:00
parent 28d3dd69de
commit 35ea412280

View File

@ -301,12 +301,16 @@ Session::destroy ()
}
routes.flush ();
boost::shared_ptr<RouteList> r = routes.reader ();
DEBUG_TRACE (DEBUG::Destruction, "delete sources\n");
for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) {
for (SourceMap::iterator i = sources.begin(); i != sources.end(); ) {
SourceMap::iterator j = i;
++j;
DEBUG_TRACE(DEBUG::Destruction, string_compose ("Dropping for source %1 ; pre-ref = %2\n", i->second->path(), i->second.use_count()));
i->second->drop_references ();
i = j;
}
sources.clear ();