diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-15 14:51:53 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-15 14:51:53 +0000 |
commit | 76a24260c7d104c6027654d785a05aea74264580 (patch) | |
tree | 9de1c3a9cd95a411ad953ed59e152435b30ccbd2 /gtk2_ardour | |
parent | 3254468526441d82134d49fd8c01305c4c362851 (diff) |
fix crash on first-run of ardour3, caused by trying to add non-existent XML nodes to a new session
git-svn-id: svn://localhost/ardour2/branches/3.0@7780 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e0876dc7b5..09964ecb5a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2782,9 +2782,17 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, return -1; } - /* Give the new session the default GUI state */ - new_session->add_instant_xml (*Config->instant_xml (X_("Editor")), false); - new_session->add_instant_xml (*Config->instant_xml (X_("Mixer")), false); + /* Give the new session the default GUI state, if such things exist */ + + XMLNode* n; + n = Config->instant_xml (X_("Editor")); + if (n) { + new_session->add_instant_xml (*n, false); + } + n = Config->instant_xml (X_("Mixer")); + if (n) { + new_session->add_instant_xml (*n, false); + } set_session (new_session); |