Mercurial > pidgin.yaz
changeset 22888:98167ea7c093
Fix setting display picture/avatar in msnp14. Thanks to Twain28 for reporting the bug. References #1187.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 14 Mar 2008 23:41:03 +0000 |
parents | b65997110933 |
children | 019052a807a3 |
files | libpurple/protocols/msn/slp.c |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c Fri Mar 07 23:19:47 2008 +0000 +++ b/libpurple/protocols/msn/slp.c Fri Mar 14 23:41:03 2008 +0000 @@ -263,7 +263,6 @@ char *msnobj_data; PurpleStoredImage *img; int type; - char *path; /* Send Ok */ content = g_strdup_printf("SessionID: %lu\r\n\r\n", @@ -288,11 +287,19 @@ g_return_if_reached(); } - path = g_build_filename(purple_smileys_get_storing_dir(), - obj->location, NULL); + if (type == MSN_OBJECT_EMOTICON) { + char *path; + path = g_build_filename(purple_smileys_get_storing_dir(), + obj->location, NULL); + img = purple_imgstore_new_from_file(path); + g_free(path); + } else { + img = msn_object_get_image(obj); + if (img) + purple_imgstore_ref(img); + } msn_object_destroy(obj); - img = purple_imgstore_new_from_file(path); - g_free(path); + if (img == NULL) { purple_debug_error("msn", "Wrong object.\n");