diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-11-10 15:03:16 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-11-10 15:03:35 -0500 |
commit | 547970b0bc7b9f6d3fb9e828e84c8bfa6a79cf36 (patch) | |
tree | 91a2f66ec2cb461a8cf7388631ef371989cf610b /gtk/gtkheaderbar.c | |
parent | c7d119614f1ceb1712e228b0e21723d39f5f32fd (diff) | |
download | gtk+-547970b0bc7b9f6d3fb9e828e84c8bfa6a79cf36.tar.gz |
headerbar: Don't leak widgets
We were not properly freeing separators that we end up
not using.
https://bugzilla.gnome.org/show_bug.cgi?id=774066
Diffstat (limited to 'gtk/gtkheaderbar.c')
-rw-r--r-- | gtk/gtkheaderbar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c index 592abe3d53..e630432b2e 100644 --- a/gtk/gtkheaderbar.c +++ b/gtk/gtkheaderbar.c @@ -458,8 +458,10 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar) if (n_children == 0) { - gtk_widget_destroy (box); - gtk_widget_destroy (separator); + g_object_ref_sink (box); + g_object_unref (box); + g_object_ref_sink (separator); + g_object_unref (separator); continue; } |