Mercurial > pidgin.yaz
changeset 29191:10df4b6b149c
Two changes:
1. If we're about to make another request to fetch an icon then cancel
the first one (if it exists)
2. When freeing a buddy, only attempt to cancel a url request if it is non-NULL
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 19 Dec 2009 02:33:53 +0000 |
parents | afebd4e2fc1a |
children | 4066bd054421 |
files | libpurple/protocols/myspace/user.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/user.c Wed Dec 16 06:27:38 2009 +0000 +++ b/libpurple/protocols/myspace/user.c Sat Dec 19 02:33:53 2009 +0000 @@ -70,7 +70,8 @@ if (!user) return; - purple_util_fetch_url_cancel(user->url_data); + if (user->url_data != NULL) + purple_util_fetch_url_cancel(user->url_data); g_free(user->client_info); g_free(user->gender); @@ -379,6 +380,8 @@ /* Only download if URL changed */ if (!previous_url || !g_str_equal(previous_url, user->image_url)) { + if (user->url_data != NULL) + purple_util_fetch_url_cancel(user->url_data); user->url_data = purple_util_fetch_url(user->image_url, TRUE, NULL, TRUE, msim_downloaded_buddy_icon, (gpointer)user); } } else if (g_str_equal(key_str, "LastImageUpdated")) {