fix crash during first-run configuration of the application, caused by using an incomplete TransportMasterManager
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user