[next] telepathy-glib: TpConnection: don' t crash if a broken CM has no Groups property

Xavier Claessens xclaesse at kemper.freedesktop.org
Wed Sep 25 12:50:24 PDT 2013


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

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Sep 24 14:03:06 2013 +0100

TpConnection: don't crash if a broken CM has no Groups property

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54500
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 telepathy-glib/connection-contact-list.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/telepathy-glib/connection-contact-list.c b/telepathy-glib/connection-contact-list.c
index f00f230..5174819 100644
--- a/telepathy-glib/connection-contact-list.c
+++ b/telepathy-glib/connection-contact-list.c
@@ -614,7 +614,7 @@ prepare_contact_groups_cb (TpProxy *proxy,
       self->priv->contact_groups->len - 1);
 
   groups = tp_asv_get_boxed (properties, "Groups", G_TYPE_STRV);
-  for (iter = groups; *iter != NULL; iter++)
+  for (iter = groups; iter != NULL && *iter != NULL; iter++)
     {
       DEBUG ("  %s", *iter);
       g_ptr_array_add (self->priv->contact_groups, g_strdup (*iter));



More information about the telepathy-commits mailing list