From 2bae75fa0b3d10b844738e0cb5d03c5de23d0c49 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 25 Apr 2012 21:21:36 +0000 Subject: 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 --- libs/ardour/control_protocol_manager.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libs/ardour/control_protocol_manager.cc') 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); + } } } } -- cgit v1.2.3