From f6766d4a2f198614e8272c02aa16fe1957c7702f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 10 Sep 2014 20:43:30 +0200 Subject: [PATCH] delete route-groups before flushing routes. --- libs/ardour/session.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 919b4be28c..fe7fad675f 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -492,6 +492,11 @@ Session::destroy () delete midi_control_ui; delete _all_route_group; + DEBUG_TRACE (DEBUG::Destruction, "delete route groups\n"); + for (list::iterator i = _route_groups.begin(); i != _route_groups.end(); ++i) { + delete *i; + } + if (click_data != default_click) { delete [] click_data; } @@ -557,12 +562,6 @@ Session::destroy () sources.clear (); } - DEBUG_TRACE (DEBUG::Destruction, "delete route groups\n"); - for (list::iterator i = _route_groups.begin(); i != _route_groups.end(); ++i) { - - delete *i; - } - /* not strictly necessary, but doing it here allows the shared_ptr debugging to work */ playlists.reset ();