summaryrefslogtreecommitdiff
path: root/libs/ardour/control_protocol_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-25 21:21:36 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-25 21:21:36 +0000
commit2bae75fa0b3d10b844738e0cb5d03c5de23d0c49 (patch)
tree9dc82419c0d076476904868f58ec3eeb9224dc6b /libs/ardour/control_protocol_manager.cc
parent40d57d1c1ec4b5bf5f8ebb695d7ca4a15c7ba041 (diff)
MCP: dynamic ipMIDI ports, more default key bindings, various minor fixes
git-svn-id: svn://localhost/ardour2/branches/3.0@12092 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/control_protocol_manager.cc')
-rw-r--r--libs/ardour/control_protocol_manager.cc12
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);
+ }
}
}
}