From: Soeren Apel Date: Wed, 13 Apr 2016 06:29:17 +0000 (+0200) Subject: View: Make sure unused groups are freed X-Git-Tag: pulseview-0.4.0~308 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e28c998ea29145b290d8fcb5b5061c33f7ec80ef;p=pulseview.git View: Make sure unused groups are freed --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index b877da1e..8d5bd6d3 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -1087,8 +1087,10 @@ void View::signals_changed() // Remove any empty trace groups for (shared_ptr group : list_by_type()) - if (group->child_items().size() == 0) + if (group->child_items().size() == 0) { remove_child_item(group); + group.reset(); + } // Add and position the pending top levels items for (auto item : new_top_level_items) {