diff options
author | Daniel Atallah <datallah@pidgin.im> | 2007-09-21 00:55:32 +0000 |
---|---|---|
committer | Daniel Atallah <datallah@pidgin.im> | 2007-09-21 00:55:32 +0000 |
commit | 053274e2f38b5d02ba6bb3cfdb1da0d19a482065 (patch) | |
tree | bcb8cd92f81f951e69c780968b35ce3d289325e7 | |
parent | f46b6da31156b1b915b004fbd7108b10fe700b74 (diff) | |
download | pidgin-053274e2f38b5d02ba6bb3cfdb1da0d19a482065.tar.gz |
Fix some incorrect assertions when G_DEBUG=fatal_warnings is set.
-rw-r--r-- | libpurple/protocols/jabber/google.c | 14 | ||||
-rw-r--r-- | libpurple/util.c | 3 |
2 files changed, 7 insertions, 10 deletions
diff --git a/libpurple/protocols/jabber/google.c b/libpurple/protocols/jabber/google.c index 929ad8a11b..2d742112be 100644 --- a/libpurple/protocols/jabber/google.c +++ b/libpurple/protocols/jabber/google.c @@ -61,14 +61,9 @@ jabber_gmail_parse(JabberStream *js, xmlnode *packet, gpointer nul) 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"); - 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 @@ jabber_gmail_parse(JabberStream *js, xmlnode *packet, gpointer nul) 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 @@ gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item) 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 --git a/libpurple/util.c b/libpurple/util.c index 3e23e5ce70..93d3ba7383 100644 --- a/libpurple/util.c +++ b/libpurple/util.c @@ -1526,7 +1526,8 @@ purple_markup_html_to_xhtml(const char *html, char **xhtml_out, 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 == '\"') |