From 62995bd38d4da7c44428cc4e021e8e82a73df3ab Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 8 Feb 2017 16:27:36 +0100 Subject: [PATCH] stop a crash during selection --- gtk2_ardour/selection.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 27a062e87d..ce39138586 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -642,12 +642,15 @@ Selection::remove (TimeAxisView* track) void Selection::remove (const TrackViewList& track_list) { + PresentationInfo::ChangeSuspender cs; + for (TrackViewList::const_iterator i = track_list.begin(); i != track_list.end(); ++i) { TrackViewList::iterator x = find (tracks.begin(), tracks.end(), *i); + if (x != tracks.end()) { - (*i)->set_selected (false); tracks.erase (x); + (*i)->set_selected (false); } } }