aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-menu.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-04-19 23:02:02 +0800
committerLars-Peter Clausen <lars@metafoo.de>2009-04-21 16:42:14 +0800
commitca4f02f71b08a1f761f2313a8fb3767a137bfa72 (patch)
tree05e9b5ab1258e7054a974dfbd3d68c012a61387f /libempathy-gtk/empathy-contact-menu.c
parent6f657e089391122c2a98d709207a728d4c35f178 (diff)
downloadgsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.tar
gsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.tar.gz
gsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.tar.bz2
gsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.tar.lz
gsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.tar.xz
gsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.tar.zst
gsoc2013-empathy-ca4f02f71b08a1f761f2313a8fb3767a137bfa72.zip
Fix memleak in empathy_contact_invite_menu_item_new. Just calling
gtk_widget_destroy on submenu won't free it since it is floating.
Diffstat (limited to 'libempathy-gtk/empathy-contact-menu.c')
-rw-r--r--libempathy-gtk/empathy-contact-menu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index f311b1290..ed46d9a53 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);