diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 479b433f29..1231212d2e 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2064,6 +2064,10 @@ Session::resort_routes () return; } + if (_route_deletion_in_progress) { + return; + } + { RCUWriter writer (routes); boost::shared_ptr r = writer.get_copy (); @@ -3363,9 +3367,8 @@ Session::add_internal_send (boost::shared_ptr dest, boost::shared_ptr routes_to_remove) { - PBD::Unwinder uw_flag (_route_deletion_in_progress, true); - { // RCU Writer scope + PBD::Unwinder uw_flag (_route_deletion_in_progress, true); RCUWriter writer (routes); boost::shared_ptr rs = writer.get_copy ();