From 21f5859981665b9dd02c25cd183ae0b4896e9b37 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 19 Dec 2014 21:30:22 +0100 Subject: [PATCH] fix double-free/crash at session close --- gtk2_ardour/time_axis_view.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 7130f9de68..4f332c196f 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -228,16 +228,16 @@ TimeAxisView::~TimeAxisView() } for (list::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) { - delete (*i)->rect; - delete (*i)->start_trim; - delete (*i)->end_trim; + delete (*i)->rect; (*i)->rect=0; + delete (*i)->start_trim; (*i)->start_trim = 0; + delete (*i)->end_trim; (*i)->end_trim = 0; } for (list::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) { - delete (*i)->rect; - delete (*i)->start_trim; - delete (*i)->end_trim; + delete (*i)->rect; (*i)->rect = 0; + delete (*i)->start_trim; (*i)->start_trim = 0; + delete (*i)->end_trim; (*i)->end_trim = 0; } delete selection_group;