aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-18 22:50:32 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-29 23:39:13 +0800
commitf5600abfa444ec8ccbca5ffb11c3e649e16f338e (patch)
tree23e34cd00c2775022f9859ae870a368cb910653e /libempathy-gtk
parente3c822bf3b14a6a769353a35a137a0b0e183ac15 (diff)
downloadgsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.tar
gsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.tar.gz
gsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.tar.bz2
gsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.tar.lz
gsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.tar.xz
gsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.tar.zst
gsoc2013-empathy-f5600abfa444ec8ccbca5ffb11c3e649e16f338e.zip
chat: use empathy_signal_connect_weak to connect signal on the buffer
The textview can't survive once the EmpathyChat has been destroyed but if for some reason its buffer it's still alive, firing this signal leads to a crash (#612363).
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 23e85c844..36b4136ee 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -2252,9 +2252,9 @@ chat_create_ui (EmpathyChat *chat)
G_CALLBACK (chat_input_populate_popup_cb),
chat);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
- g_signal_connect (buffer, "changed",
+ empathy_signal_connect_weak (buffer, "changed",
G_CALLBACK (chat_input_text_buffer_changed_cb),
- chat);
+ G_OBJECT (chat));
gtk_text_buffer_create_tag (buffer, "misspelled",
"underline", PANGO_UNDERLINE_ERROR,
NULL);