[next] telepathy-glib: channel-group: don' t assume we get the MemberIdentifiers property from the CM

Jonny Lamb jonny at kemper.freedesktop.org
Tue Aug 28 04:17:16 PDT 2012


Module: telepathy-glib
Branch: next
Commit: 6b3e4bf46765578e2f5550a0872dc56b58f561ce
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=6b3e4bf46765578e2f5550a0872dc56b58f561ce

Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date:   Mon Aug 27 17:48:47 2012 +0100

channel-group: don't assume we get the MemberIdentifiers property from the CM

Absence of this property means we'll try and get a TpContact by
looking up handles in this non-existent hash table. :-(

Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>

---

 telepathy-glib/channel-group.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index e885841..1076c89 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -924,6 +924,15 @@ got_group_properties_cb (TpProxy *proxy,
   identifiers = tp_asv_get_boxed (asv, "MemberIdentifiers",
       TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP);
 
+  if (identifiers == NULL)
+    {
+      g_simple_async_result_set_error (result, TP_ERROR,
+          TP_ERROR_INVALID_ARGUMENT,
+          "Failed to get MemberIdentifiers property from Group interface");
+      g_simple_async_result_complete (result);
+      return;
+    }
+
   self->priv->group_self_contact = dup_contact (self,
       tp_asv_get_uint32 (asv, "SelfHandle", NULL),
       identifiers);



More information about the telepathy-commits mailing list