Mercurial > pidgin
changeset 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 | 04590d9db8b7 |
children | e23a1585d822 |
files | libpurple/protocols/jabber/google.c libpurple/util.c |
diffstat | 2 files changed, 7 insertions(+), 10 deletions(-) [+] |
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; }
--- a/libpurple/util.c Fri Sep 21 00:53:41 2007 +0000 +++ b/libpurple/util.c Fri Sep 21 00:55:32 2007 +0000 @@ -1526,7 +1526,8 @@ while(*p && *p != '>') { if(!g_ascii_strncasecmp(p, "href=", strlen("href="))) { const char *q = p + strlen("href="); - g_string_free(url, TRUE); + if (url) + g_string_free(url, TRUE); url = g_string_new(""); cdata = g_string_new(""); if(*q == '\'' || *q == '\"')