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).
G_CALLBACK (chat_input_populate_popup_cb),
chat);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
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),
G_CALLBACK (chat_input_text_buffer_changed_cb),
gtk_text_buffer_create_tag (buffer, "misspelled",
"underline", PANGO_UNDERLINE_ERROR,
NULL);
gtk_text_buffer_create_tag (buffer, "misspelled",
"underline", PANGO_UNDERLINE_ERROR,
NULL);