From c16eb83fecb6f5eda3680f3aaf4ae83947847d35 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 15 Nov 2016 08:16:31 +1000 Subject: Fix crash when selecting MIDI note Replace now always invalid assertion with initialization Related to #7110 --- gtk2_ardour/selection.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gtk2_ardour') 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 > > > > rid_notes; editor->get_per_region_note_selection (rid_notes); list > > > >::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 > >::iterator i = (*rn_it).second.begin(); i != (*rn_it).second.end(); ++i) { -- cgit v1.2.3