[gtk+] menu: Don't leak check menu items
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] menu: Don't leak check menu items
- Date: Wed, 23 Nov 2016 19:48:53 +0000 (UTC)
commit 3a947fa318e50db950609d319523e495995b98f6
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 23 14:48:17 2016 -0500
menu: Don't leak check menu items
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774686
gtk/gtkmenu.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 7839098..514dd67 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -3056,6 +3056,8 @@ static void gtk_menu_measure (GtkWidget *widget,
max_toggle_size = indicator_width;
gtk_widget_destroy (menu_item);
+ g_object_ref_sink (menu_item);
+ g_object_unref (menu_item);
}
min_width += 2 * max_toggle_size + max_accel_width;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]