mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
fix crash during first-run configuration of the application, caused by using an incomplete TransportMasterManager
This commit is contained in:
parent
c04fc2efe2
commit
bf2d9e7a34
3 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue