Fix heap-use-after-free at exit

Deleting _track_canvas_viewport automatically destroys
any child Items. The LocationMarker's group was already destroyed
when ~ArdourMarker() runs and calls `delete group`.

So first delete the marker, then the canvas
This commit is contained in:
Robin Gareus 2023-06-08 22:39:14 +02:00
parent 733d59c65b
commit a5946ba2e2
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 8 additions and 6 deletions

View file

@ -290,6 +290,7 @@ Editor::Editor ()
, cd_marker_group (0)
, _time_markers_group (0)
, _selection_marker_group (0)
, _selection_marker (new LocationMarkers)
, hv_scroll_group (0)
, h_scroll_group (0)
, cursor_scroll_group (0)
@ -887,6 +888,7 @@ Editor::~Editor()
delete new_transport_marker_menu;
delete editor_ruler_menu;
delete _popup_region_menu_item;
delete _selection_marker;
delete button_bindings;
delete _routes;