[empathy] Don't crash when switching to a tab with no TpChat
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Don't crash when switching to a tab with no TpChat
- Date: Sat, 13 Feb 2010 16:59:52 +0000 (UTC)
commit 26024d8ad63511ec46f928d12bc2689098480104
Author: Will Thompson <will thompson collabora co uk>
Date: Sat Feb 13 16:10:53 2010 +0000
Don't crash when switching to a tab with no TpChat
Fixes: #609843
libempathy-gtk/empathy-chat.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index d27337b..5702adb 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]