[empathy/gnome-2-34] individual-menu: ensure that the contact stays alive while the activate signal is connected (#641119
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-2-34] individual-menu: ensure that the contact stays alive while the activate signal is connected (#641119
- Date: Thu, 3 Feb 2011 10:48:40 +0000 (UTC)
commit 175dcba889d04e5322047611c33eefbeab153017
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Feb 3 11:02:35 2011 +0100
individual-menu: ensure that the contact stays alive while the activate signal is connected (#641119)
libempathy-gtk/empathy-individual-menu.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index d90e57e..2a578a0 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -460,8 +460,10 @@ menu_item_set_contact (GtkWidget *item,
if (can_do_action == TRUE)
{
- g_signal_connect (item, "activate", G_CALLBACK (activate_callback),
- contact);
+ /* We want to make sure that the EmpathyContact stays alive while the
+ * signal is connected. */
+ g_signal_connect_data (item, "activate", G_CALLBACK (activate_callback),
+ g_object_ref (contact), (GClosureNotify) g_object_unref, 0);
}
return can_do_action;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]