# HG changeset patch # User Luke Schierer # Date 1070031185 0 # Node ID 6a4d65df3f1c32f43ce4f9afe0000b0c714ab9fd # Parent c8337162c71226dbdb6bc784a99895937ef0c440 [gaim-migrate @ 8290] don't crash when double clicking on an aim buddy who is offline committer: Tailor Script diff -r c8337162c712 -r 6a4d65df3f1c src/protocols/oscar/oscar.c --- 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, ...) { diff -r c8337162c712 -r 6a4d65df3f1c src/prpl.c --- 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; }