From 5ce47b52da7bb60b5b7dde94ca0bacc6ae44197a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 14 Jul 2010 02:23:37 +0000 Subject: [PATCH] Fix track lifetime wrt graph. Fixes #3251. git-svn-id: svn://localhost/ardour2/branches/3.0@7410 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index a19fa791d8..4e59a73f5f 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -263,7 +263,7 @@ Session::destroy () RegionFactory::delete_all_regions (); DEBUG_TRACE (DEBUG::Destruction, "delete routes\n"); - + /* reset these three references to special routes before we do the usual route delete thing */ auditioner.reset (); @@ -2099,9 +2099,11 @@ Session::remove_route (shared_ptr route) update_latency_compensation (false, false); set_dirty(); - /* flush references out of the graph + /* Re-sort routes to remove the graph's current references to the one that is + * going away, then flush old references out of the graph. */ + resort_routes (); route_graph->clear_other_chain (); /* get rid of it from the dead wood collection in the route list manager */