diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-07 21:58:56 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-07 21:58:56 +0000 |
commit | 0385368d87ec550c671ea4c0c7c3f4d05f8f8a99 (patch) | |
tree | 8ea9a5ed1e1bdcb7c928d469b52a98e00fff0cf0 | |
parent | a9d59912053317fa840b5880a3dace6aaa68e576 (diff) |
fix crash with a new session
git-svn-id: svn://localhost/ardour2/branches/3.0@9806 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 8c1c811674..e3cb0c7e1a 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -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; + } } } |