# HG changeset patch # User Daniel Atallah # Date 1190336132 0 # Node ID 45b5247094755e5de6bc10076b5b78b016b0073b # Parent 04590d9db8b798467c8f409bb3dd4321387ea607 Fix some incorrect assertions when G_DEBUG=fatal_warnings is set. diff -r 04590d9db8b7 -r 45b524709475 libpurple/protocols/jabber/google.c --- 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; } diff -r 04590d9db8b7 -r 45b524709475 libpurple/util.c --- 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 == '\"')