aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-02-14 00:10:53 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-02-14 00:59:40 +0800
commit26024d8ad63511ec46f928d12bc2689098480104 (patch)
treedac5048eef6d6daf422d98f85ee3a69ae4d032eb /libempathy-gtk
parenta0e6a68707d834fbae1cdf93dadc4674a665c032 (diff)
downloadgsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.tar
gsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.tar.gz
gsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.tar.bz2
gsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.tar.lz
gsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.tar.xz
gsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.tar.zst
gsoc2013-empathy-26024d8ad63511ec46f928d12bc2689098480104.zip
Don't crash when switching to a tab with no TpChat
Fixes: #609843
Diffstat (limited to 'libempathy-gtk')
-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);