[empathy] Fix memleak in empathy_contact_invite_menu_item_new. Just calling
- From: Lars-Peter Clausen <larsc src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Fix memleak in empathy_contact_invite_menu_item_new. Just calling
- Date: Tue, 21 Apr 2009 04:49:48 -0400 (EDT)
commit ca4f02f71b08a1f761f2313a8fb3767a137bfa72
Author: Lars-Peter Clausen <lars metafoo de>
Date: Sun Apr 19 17:02:02 2009 +0200
Fix memleak in empathy_contact_invite_menu_item_new. Just calling
gtk_widget_destroy on submenu won't free it since it is floating.
---
libempathy-gtk/empathy-contact-menu.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index f311b12..ed46d9a 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -395,7 +395,9 @@ empathy_contact_invite_menu_item_new (EmpathyContact *contact)
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
} else {
gtk_widget_set_sensitive (item, FALSE);
- gtk_widget_destroy (submenu);
+ g_object_ref_sink (submenu);
+ gtk_widget_destroy (submenu);
+ g_object_unref (submenu);
}
gtk_widget_show (image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]