From 03db585f24667414105fce7b59129db196576d27 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 13 May 2021 10:23:43 -0600 Subject: [PATCH] do not delete display (context) menu when adding a new automation child lane The manu is rebuilt every time it is required, no need to delete it. In addition, deleting it in the middle of an event handler causes memory corruption because the entire menu (with all items and submenus) is deleted before event handling for the menu is completed --- gtk2_ardour/stripable_time_axis.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gtk2_ardour/stripable_time_axis.cc b/gtk2_ardour/stripable_time_axis.cc index 4860e5a4b8..3a0df1ae3a 100644 --- a/gtk2_ardour/stripable_time_axis.cc +++ b/gtk2_ardour/stripable_time_axis.cc @@ -95,16 +95,6 @@ StripableTimeAxisView::add_automation_child (Evoral::Parameter param, boost::sha if (show && !no_redraw) { request_redraw (); } - - if (!ARDOUR::parameter_is_midi((AutomationType)param.type())) { - /* MIDI-related parameters are always in the menu, there's no - reason to rebuild the menu just because we added a automation - lane for one of them. But if we add a non-MIDI automation - lane, then we need to invalidate the display menu. - */ - delete display_menu; - display_menu = 0; - } } void