aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-chat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index d27337b25..5702adb70 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -2947,8 +2947,12 @@ empathy_chat_messages_read (EmpathyChat *self)
g_return_if_fail (EMPATHY_IS_CHAT (self));
- empathy_tp_chat_acknowledge_messages (priv->tp_chat,
+ if (priv->tp_chat != NULL) {
+ empathy_tp_chat_acknowledge_messages (priv->tp_chat,
priv->pending_messages);
+ }
+ /* ...else, we can't do any acknowledging because the channel (or
+ * indeed connection) has gone away. */
while (priv->pending_messages != NULL) {
g_object_unref (priv->pending_messages->data);