diff --git a/libs/ardour/ardour/transport_master_manager.h b/libs/ardour/ardour/transport_master_manager.h index 8b27adedda..a67b7a122c 100644 --- a/libs/ardour/ardour/transport_master_manager.h +++ b/libs/ardour/ardour/transport_master_manager.h @@ -52,7 +52,7 @@ class LIBARDOUR_API TransportMasterManager : public boost::noncopyable int add (SyncSource type, std::string const & name, bool removeable = true); int remove (std::string const & name); - void clear (); + void clear (bool emit = true); PBD::Signal1 > Added; PBD::Signal1 > Removed; // null argument means "clear" diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 4a0d0979a9..2dc0589661 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -754,7 +754,7 @@ ARDOUR::cleanup () engine_startup_connection.disconnect (); delete &ControlProtocolManager::instance (); - ARDOUR::TransportMasterManager::instance ().clear (); + ARDOUR::TransportMasterManager::instance ().clear (false); ARDOUR::AudioEngine::destroy (); ARDOUR::TransportMasterManager::destroy (); diff --git a/libs/ardour/transport_master_manager.cc b/libs/ardour/transport_master_manager.cc index 84058fb137..3c4c645f47 100644 --- a/libs/ardour/transport_master_manager.cc +++ b/libs/ardour/transport_master_manager.cc @@ -582,7 +582,7 @@ TransportMasterManager::set_current (std::string const & str) void -TransportMasterManager::clear () +TransportMasterManager::clear (bool emit) { { Glib::Threads::RWLock::WriterLock lm (lock); @@ -590,7 +590,9 @@ TransportMasterManager::clear () _transport_masters.clear (); } - Removed (std::shared_ptr()); + if (emit) { + Removed (std::shared_ptr()); + } } int