From 6794a836616453b2dbbd5df039b39ca1e91a4345 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 14 Nov 2016 04:12:58 +0100 Subject: [PATCH] potential fix for #7110 (older sessions have no id) --- gtk2_ardour/selection.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index dce8d13a41..5c93fd62c8 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1394,10 +1394,11 @@ Selection::set_state (XMLNode const & node, int) XMLNodeList children = (*i)->children (); for (XMLNodeList::const_iterator ci = children.begin(); ci != children.end(); ++ci) { - XMLProperty const * prop_id = (*ci)->property (X_("id")); - Evoral::event_id_t id = atoi(prop_id->value()); - - notes.push_back (id); + XMLProperty const* prop_id = (*ci)->property (X_("id")); + if (prop_id) { + Evoral::event_id_t id = atoi (prop_id->value ()); + notes.push_back (id); + } } for (RegionSelection::iterator rsi = rs.begin(); rsi != rs.end(); ++rsi) { -- 2.30.2