diff options
author | Robin Gareus <robin@gareus.org> | 2016-07-25 17:38:59 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-07-25 17:38:59 +0200 |
commit | 822810b88fd13d1764b5f686baa8edb3e27e95fc (patch) | |
tree | d5b471d92d628079cbf29375d9ad767ef3286880 /gtk2_ardour/time_axis_view.cc | |
parent | eec294a97edce69ca71c972867ab708d5dd5625d (diff) |
the endless quest to plug memory leaks -- episode 379
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 8ddc2e51ca..540dddcb3d 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -929,6 +929,8 @@ TimeAxisView::order_selection_trims (ArdourCanvas::Item *item, bool put_start_on } } +// retuned rect is pushed back into the used_selection_rects list +// in TimeAxisView::show_selection() which is the only caller. SelectionRect * TimeAxisView::get_selection_rect (uint32_t id) { @@ -938,7 +940,9 @@ TimeAxisView::get_selection_rect (uint32_t id) for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) { if ((*i)->id == id) { - return (*i); + SelectionRect* ret = (*i); + used_selection_rects.erase (i); + return ret; } } |