mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 05:15:50 +01:00
Fix crash when repeatedly showing group menu
route_group_menu needs to be detached before TimeAxisView::build_display_menu () deletes and recreates the parent menu.
This commit is contained in:
@@ -47,6 +47,7 @@ RouteGroupMenu::RouteGroupMenu (Session* s, PropertyList* plist)
|
||||
|
||||
RouteGroupMenu::~RouteGroupMenu()
|
||||
{
|
||||
detach ();
|
||||
delete _menu;
|
||||
delete _default_properties;
|
||||
}
|
||||
|
||||
@@ -627,6 +627,10 @@ RouteTimeAxisView::build_display_menu ()
|
||||
detach_menu (*automation_action_menu);
|
||||
}
|
||||
|
||||
if (route_group_menu) {
|
||||
route_group_menu->detach ();
|
||||
}
|
||||
|
||||
TimeAxisView::build_display_menu ();
|
||||
|
||||
bool active = _route->active ();
|
||||
@@ -812,7 +816,6 @@ RouteTimeAxisView::build_display_menu ()
|
||||
}
|
||||
|
||||
if (!_route->is_singleton ()) {
|
||||
route_group_menu->detach ();
|
||||
route_group_menu->build (r);
|
||||
items.push_back (MenuElem (_("Group"), *route_group_menu->menu ()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user