[empathy/gnome-2-26] 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/gnome-2-26] Fix memleak in empathy_contact_invite_menu_item_new. Just calling
- Date: Tue, 21 Apr 2009 06:31:17 -0400 (EDT)
commit 2f9f19a45a575b9d7d8daceb89640a66a2f7f4da
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]