From 11b22d503d0c2625e8b82fca02e0016154fac94b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 5 Feb 2011 15:27:11 +0000 Subject: [PATCH] Fix crash on startup with a new Ardour install. git-svn-id: svn://localhost/ardour2/branches/3.0@8720 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui.cc | 7 +++++-- 1 file 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);