diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-09-14 16:36:55 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-14 16:36:55 +0800 |
commit | 6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0 (patch) | |
tree | f2974f8d9c78c348e52bb1870616c19988fde195 | |
parent | a7a632c6fc92759d927b18a020c76e5c9b848d69 (diff) | |
download | gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.tar gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.tar.gz gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.tar.bz2 gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.tar.lz gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.tar.xz gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.tar.zst gsoc2013-empathy-6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0.zip |
tp_chat_group_members_changed_cb: early return if removed or added have not the expected length (#629549)
-rw-r--r-- | libempathy/empathy-tp-chat.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 6f4874fc8..375683b62 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -1119,8 +1119,11 @@ tp_chat_group_members_changed_cb (TpChannel *self, /* Contact renamed */ if (reason == TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED) { /* there can only be a single 'added' and a single 'removed' handle */ - g_warn_if_fail (removed->len == 1); - g_warn_if_fail (added->len == 1); + if (removed->len != 1 || added->len != 1) { + g_warning ("RENAMED with %u added, %u removed (expected 1, 1)", + added->len, removed->len); + return; + } old_handle = g_array_index (removed, guint, 0); |