telepathy-gabble: muc_factory_broadcast_presence(): don' t crash if disconnected

Will Thompson wjt at kemper.freedesktop.org
Fri Nov 9 09:18:25 PST 2012


Module: telepathy-gabble
Branch: master
Commit: 64b405cb025a00c3962a415dd90119771517cf6a
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=64b405cb025a00c3962a415dd90119771517cf6a

Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Tue Nov  6 16:46:44 2012 +0000

muc_factory_broadcast_presence(): don't crash if disconnected

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52362 (I hope)

---

 src/muc-factory.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/muc-factory.c b/src/muc-factory.c
index 4cc7e21..f734c13 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -830,6 +830,9 @@ gabble_muc_factory_broadcast_presence (GabbleMucFactory *self)
   GHashTableIter iter;
   gpointer channel = NULL;
 
+  if (priv->text_channels == NULL)
+    return;
+
   g_hash_table_iter_init (&iter, priv->text_channels);
 
   while (g_hash_table_iter_next (&iter, NULL, &channel))



More information about the telepathy-commits mailing list