diff options
author | Robin Gareus <robin@gareus.org> | 2016-11-14 04:12:58 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-11-14 04:12:58 +0100 |
commit | 6794a836616453b2dbbd5df039b39ca1e91a4345 (patch) | |
tree | e818703e71ed362b949e2c884f408ee0ffef4a2b /gtk2_ardour/selection.cc | |
parent | 37137d5b3c9503a0ee5f4a67b8be67304e84d77d (diff) |
potential fix for #7110 (older sessions have no id)
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 9 |
1 files 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) { |