summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-11 18:30:32 +0200
committerRobin Gareus <robin@gareus.org>2017-09-11 18:30:32 +0200
commit339c64180e1e287789aa598bcceca07d8b494e94 (patch)
tree395b96812edb41ab045d786d570bd7a0f49248c8
parent019f6643564cadc7805aa46bd1d232bdc3b3c3c5 (diff)
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
-rw-r--r--gtk2_ardour/editor.cc4
1 files changed, 4 insertions, 0 deletions
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(); ) {