Mercurial > pidgin.yaz
changeset 7647:6a4d65df3f1c
[gaim-migrate @ 8290]
don't crash when double clicking on an aim buddy who is offline
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 28 Nov 2003 14:53:05 +0000 |
parents | c8337162c712 |
children | ab7497c96b1a |
files | src/protocols/oscar/oscar.c src/prpl.c |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Thu Nov 27 19:04:19 2003 +0000 +++ b/src/protocols/oscar/oscar.c Fri Nov 28 14:53:05 2003 +0000 @@ -1057,17 +1057,23 @@ static gboolean oscar_has_sendfile (GaimConnection *gc, const char *who) { - GaimBuddy *b = gaim_find_buddy(gc->account, who); + GaimBuddy *b = NULL; aim_userinfo_t *userinfo; OscarData *od = gc->proto_data; + if(who) + b = gaim_find_buddy(gc->account, who); + if (b) userinfo = aim_locate_finduserinfo(od->sess, b->name); + + if(userinfo) { + /* True if we can send files to this dude, false if we can't */ + return userinfo->capabilities & AIM_CAPS_SENDFILE; + } else return FALSE; - /* True if we can send files to this dude, false if we can't */ - return userinfo->capabilities & AIM_CAPS_SENDFILE; } static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) {
--- a/src/prpl.c Thu Nov 27 19:04:19 2003 +0000 +++ b/src/prpl.c Fri Nov 28 14:53:05 2003 +0000 @@ -120,7 +120,9 @@ if (prpl_info->has_send_file == NULL || prpl_info->send_file == NULL) return FALSE; + if(name) + return prpl_info->has_send_file(gc, name); - return prpl_info->has_send_file(gc, name); + return 0; }