diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 4db9e45..36b4136 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1244,13 +1244,10 @@ static void
 chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
                                    EmpathyChat    *chat)
 {
-	EmpathyChatPriv *priv;
 	GtkTextIter     start, end;
 	gchar          *str;
 	gboolean        spell_checker = FALSE;
 
-	priv = GET_PRIV (chat);
-
 	if (gtk_text_buffer_get_char_count (buffer) == 0) {
 		chat_composing_stop (chat);
 	} else {
@@ -2255,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);
