int init ();
static TransportMasterManager& instance();
+ static bool exists() { return _instance != 0; }
typedef std::list<boost::shared_ptr<TransportMaster> > TransportMasters;
}
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;
}
{
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);