diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/transport_master_manager.h | 1 | ||||
-rw-r--r-- | libs/ardour/rc_configuration.cc | 5 | ||||
-rw-r--r-- | libs/ardour/transport_master_manager.cc | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/ardour/transport_master_manager.h b/libs/ardour/ardour/transport_master_manager.h index 46d195bf24..5ed3855eb2 100644 --- a/libs/ardour/ardour/transport_master_manager.h +++ b/libs/ardour/ardour/transport_master_manager.h @@ -38,6 +38,7 @@ class LIBARDOUR_API TransportMasterManager : public boost::noncopyable int init (); static TransportMasterManager& instance(); + static bool exists() { return _instance != 0; } typedef std::list<boost::shared_ptr<TransportMaster> > TransportMasters; diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc index c558be8b08..3227a644dd 100644 --- a/libs/ardour/rc_configuration.cc +++ b/libs/ardour/rc_configuration.cc @@ -189,7 +189,10 @@ RCConfiguration::get_state () } root->add_child_nocopy (ControlProtocolManager::instance().get_state()); - root->add_child_nocopy (TransportMasterManager::instance().get_state()); + + if (TransportMasterManager::exists()) { + root->add_child_nocopy (TransportMasterManager::instance().get_state()); + } return *root; } diff --git a/libs/ardour/transport_master_manager.cc b/libs/ardour/transport_master_manager.cc index 063224632c..6354dff05c 100644 --- a/libs/ardour/transport_master_manager.cc +++ b/libs/ardour/transport_master_manager.cc @@ -522,7 +522,9 @@ TransportMasterManager::get_state () { XMLNode* node = new XMLNode (state_node_name); - node->set_property (X_("current"), _current_master->name()); + if (_current_master) { + node->set_property (X_("current"), _current_master->name()); + } Glib::Threads::RWLock::ReaderLock lm (lock); |