Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/google.c @ 20587:45b524709475
Fix some incorrect assertions when G_DEBUG=fatal_warnings is set.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 21 Sep 2007 00:55:32 +0000 |
parents | 5b35273d145f |
children | d41907afb521 707cd521188a |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c Fri Sep 21 00:53:41 2007 +0000 +++ b/libpurple/protocols/jabber/google.c Fri Sep 21 00:55:32 2007 +0000 @@ -61,14 +61,9 @@ to = xmlnode_get_attrib(packet, "to"); default_tos[0] = jabber_get_bare_jid(to); - if (count == 0) { - purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL); - g_free(default_tos[0]); - return; - } + message = xmlnode_get_child(child, "mail-thread-info"); - message = xmlnode_get_child(child, "mail-thread-info"); - if (!message) { + if (count == 0 || !message) { purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL); g_free(default_tos[0]); return; @@ -127,7 +122,7 @@ if (i>0) purple_notify_emails(js->gc, count, count == i, (const char**) subjects, froms, tos, urls, NULL, NULL); - else + else purple_notify_emails(js->gc, count, FALSE, NULL, NULL, (const char**) default_tos, NULL, NULL, NULL); @@ -257,7 +252,8 @@ if (grt && (*grt == 'H' || *grt == 'h')) { PurpleBuddy *buddy = purple_find_buddy(account, jid_norm); - purple_blist_remove_buddy(buddy); + if (buddy) + purple_blist_remove_buddy(buddy); g_free(jid_norm); return FALSE; }