From c5615423317f2604498fb4bd2d7d3be02d06d31e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 7 Nov 2011 17:15:39 +0100 Subject: [PATCH] channel-contacts: hash table may contain NULL contact This is the case when joining a room containing members having an unknown owner. https://bugs.freedesktop.org/show_bug.cgi?id=42670 --- telepathy-glib/channel-contacts.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c index 0117333..2146cf3 100644 --- a/telepathy-glib/channel-contacts.c +++ b/telepathy-glib/channel-contacts.c @@ -1093,7 +1093,12 @@ append_contacts (GPtrArray *contacts, g_hash_table_iter_init (&iter, table); while (g_hash_table_iter_next (&iter, NULL, &value)) - g_ptr_array_add (contacts, value); + { + if (value == NULL) + continue; + + g_ptr_array_add (contacts, value); + } } void -- 1.7.4.1