diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-11-15 08:16:31 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2016-11-15 08:16:31 +1000 |
commit | c16eb83fecb6f5eda3680f3aaf4ae83947847d35 (patch) | |
tree | 570068f77871cec2de7457250ae1d28bdf4e0692 /gtk2_ardour/selection.cc | |
parent | f30fbcaaf968dcb5af8b762b6e3d25f6fe313f3f (diff) |
Fix crash when selecting MIDI note
Replace now always invalid assertion with initialization
Related to #7110
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 2b496fb833..98b5d62c10 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1270,14 +1270,12 @@ Selection::get_state () const } /* midi region views have thir own internal selection. */ - XMLNode* n = NULL; list<pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > > rid_notes; editor->get_per_region_note_selection (rid_notes); list<pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > >::iterator rn_it; for (rn_it = rid_notes.begin(); rn_it != rid_notes.end(); ++rn_it) { - assert(n); // hint for clang static analysis - n = node->add_child (X_("MIDINotes")); + XMLNode* n = node->add_child (X_("MIDINotes")); n->add_property (X_("region-id"), atoi((*rn_it).first.to_s().c_str())); for (std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > >::iterator i = (*rn_it).second.begin(); i != (*rn_it).second.end(); ++i) { |