aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-03 18:02:35 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-03 18:28:29 +0800
commit8978c0d955186405e291a7ff2ac71a063cdb9e68 (patch)
tree597af59854ff13647cfcfc33186def7f4b9de9c2 /libempathy-gtk
parent8859363aee3d81abd6fb84f8d54f78e782d90425 (diff)
downloadgsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.tar
gsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.tar.gz
gsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.tar.bz2
gsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.tar.lz
gsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.tar.xz
gsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.tar.zst
gsoc2013-empathy-8978c0d955186405e291a7ff2ac71a063cdb9e68.zip
individual-menu: ensure that the contact stays alive while the activate signal is connected (#641119)
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-menu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 29ead4fb0..76d708156 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;