From 339c64180e1e287789aa598bcceca07d8b494e94 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 11 Sep 2017 18:30:32 +0200 Subject: Fix crash when hiding multiple tracks Editor::hide_track_in_display() -> EditorRoutes::hide_track_in_display() and ensuing calls to sync the treeview may modify the selection (de-select hidden tracks) and invalidate selection->tracks --- gtk2_ardour/editor.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 210f6350be..4f4bee4839 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5510,6 +5510,10 @@ Editor::hide_track_in_display (TimeAxisView* tv, bool apply_to_selection) if (!tv) { return; } + + DisplaySuspender ds; + PresentationInfo::ChangeSuspender cs; + if (apply_to_selection) { for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ) { -- cgit v1.2.3