]> git.0d.be Git - empathy.git/commitdiff
tp_chat_group_members_changed_cb: early return if removed or added have not the expec...
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 14 Sep 2010 08:36:55 +0000 (10:36 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 14 Sep 2010 08:36:55 +0000 (10:36 +0200)
libempathy/empathy-tp-chat.c

index 6f4874fc86cb3c293f50d9912660867605461de5..375683b620fe5ab650d9fefe439105110ca07483 100644 (file)
@@ -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);