diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-05 15:27:11 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-05 15:27:11 +0000 |
commit | 11b22d503d0c2625e8b82fca02e0016154fac94b (patch) | |
tree | 2f387c5e6d26d6be6b2cc4eee7993f48846f04fa /gtk2_ardour/ardour_ui.cc | |
parent | 0995509a1555322b18fd7c67d3f06934a957f8fd (diff) |
Fix crash on startup with a new Ardour install.
git-svn-id: svn://localhost/ardour2/branches/3.0@8720 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 1e0b75d3cb..056e1d6cff 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2837,8 +2837,11 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, } /* Put the playhead at 0 and scroll fully left */ - new_session->instant_xml(X_("Editor"))->add_property (X_("playhead"), X_("0")); - new_session->instant_xml(X_("Editor"))->add_property (X_("left-frame"), X_("0")); + n = new_session->instant_xml (X_("Editor")); + if (n) { + n->add_property (X_("playhead"), X_("0")); + n->add_property (X_("left-frame"), X_("0")); + } set_session (new_session); |