diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-18 15:20:19 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-18 15:28:10 -0400 |
commit | c4b1a5504ec89783f1565510761a2caf490cb530 (patch) | |
tree | ca099f17340ecd65765a5626233112dd897a1113 | |
parent | da5a49067839ec32a016bf1b66c3808ad7cbf699 (diff) |
fix missing Click outputs for new sessions
-rw-r--r-- | libs/ardour/ardour/session.h | 2 | ||||
-rw-r--r-- | libs/ardour/session.cc | 10 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 9c4edfa1a1..8226f16866 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1610,7 +1610,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void setup_ltc (); void setup_click (); - void setup_click_state (const XMLNode&); + void setup_click_state (const XMLNode*); void setup_bundles (); static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 28849e2930..0d078690f1 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -597,16 +597,18 @@ Session::setup_click () _click_gain.reset (new Amp (*this)); _click_gain->activate (); if (state_tree) { - setup_click_state (*state_tree->root()); + setup_click_state (state_tree->root()); + } else { + setup_click_state (0); } } void -Session::setup_click_state (const XMLNode& node) +Session::setup_click_state (const XMLNode* node) { const XMLNode* child = 0; - - if ((child = find_named_node (node, "Click")) != 0) { + + if (node && (child = find_named_node (*node, "Click")) != 0) { /* existing state for Click */ int c = 0; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 94e9f00564..ec29f8a373 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1317,7 +1317,7 @@ Session::set_state (const XMLNode& node, int version) if ((child = find_named_node (node, "Click")) == 0) { warning << _("Session: XML state has no click section") << endmsg; } else if (_click_io) { - setup_click_state (node); + setup_click_state (&node); } if ((child = find_named_node (node, ControlProtocolManager::state_node_name)) != 0) { |