comparison src/protocols/oscar/oscar.c @ 10517:461334f300d7

[gaim-migrate @ 11821] oscar_can_receive_file was crashing when logging out with a AIM conversation open. Apparently the GaimConnection wasn't NULL, but the proto_data was. There are also a couple little compile warning fixes. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 14 Jan 2005 02:02:43 +0000
parents 1a97d5e88d12
children b08a37897395
comparison
equal deleted inserted replaced
10516:d7ca3fa38e05 10517:461334f300d7
696 696
697 static void oscar_string_append_info(GaimConnection *gc, GString *str, const char *newline, GaimBuddy *b, aim_userinfo_t *userinfo) 697 static void oscar_string_append_info(GaimConnection *gc, GString *str, const char *newline, GaimBuddy *b, aim_userinfo_t *userinfo)
698 { 698 {
699 OscarData *od; 699 OscarData *od;
700 GaimAccount *account; 700 GaimAccount *account;
701 GaimPresence *presence; 701 GaimPresence *presence = NULL;
702 GaimStatus *status; 702 GaimStatus *status = NULL;
703 GaimGroup *g = NULL; 703 GaimGroup *g = NULL;
704 struct buddyinfo *bi = NULL; 704 struct buddyinfo *bi = NULL;
705 char *tmp; 705 char *tmp;
706 706
707 od = gc->proto_data; 707 od = gc->proto_data;
2145 2145
2146 static gboolean oscar_can_receive_file(GaimConnection *gc, const char *who) { 2146 static gboolean oscar_can_receive_file(GaimConnection *gc, const char *who) {
2147 gboolean can_receive = FALSE; 2147 gboolean can_receive = FALSE;
2148 OscarData *od = gc->proto_data; 2148 OscarData *od = gc->proto_data;
2149 2149
2150 if (!od->icq) { 2150 if (od != NULL && !od->icq) {
2151 aim_userinfo_t *userinfo; 2151 aim_userinfo_t *userinfo;
2152 userinfo = aim_locate_finduserinfo(od->sess, who); 2152 userinfo = aim_locate_finduserinfo(od->sess, who);
2153 if (userinfo && userinfo->capabilities & AIM_CAPS_SENDFILE) 2153 if (userinfo && userinfo->capabilities & AIM_CAPS_SENDFILE)
2154 can_receive = TRUE; 2154 can_receive = TRUE;
2155 } 2155 }