diff options
Diffstat (limited to 'libs/ardour/control_protocol_manager.cc')
-rw-r--r-- | libs/ardour/control_protocol_manager.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 876091fa7d..c72d3f31d0 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -75,8 +75,16 @@ ControlProtocolManager::set_session (Session* s) instantiate (**i); (*i)->requested = false; - if ((*i)->protocol && (*i)->state) { - (*i)->protocol->set_state (*(*i)->state, Stateful::loading_state_version); + if ((*i)->protocol) { + if ((*i)->state) { + (*i)->protocol->set_state (*(*i)->state, Stateful::loading_state_version); + } else { + /* guarantee a call to + set_state() whether we have + existing state or not + */ + (*i)->protocol->set_state (XMLNode(""), Stateful::loading_state_version); + } } } } |