Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 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 | ea2d07ad05a9 |
children | 6db061321ec4 |
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, ...) {