fix crash with a new session

git-svn-id: svn://localhost/ardour2/branches/3.0@9806 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-07-07 21:58:56 +00:00
parent a9d5991205
commit 0385368d87

View File

@ -64,11 +64,15 @@ ARDOUR_UI::set_session (Session *s)
return;
}
const XMLNodeList& children = _session->extra_xml (X_("UI"))->children();
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == GUIObjectState::xml_node_name) {
gui_object_state->load (**i);
break;
const XMLNode* node = _session->extra_xml (X_("UI"));
if (node) {
const XMLNodeList& children = node->children();
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == GUIObjectState::xml_node_name) {
gui_object_state->load (**i);
break;
}
}
}