# HG changeset patch # User Jim Seymour # Date 1022112361 0 # Node ID 6231e0f0ee9e6bcd74fe10d4181f3a0c16471795 # Parent 3ab37015a39529ff9ab5d3e73c27e2d27b7ac852 [gaim-migrate @ 3288] Fix crash for checking ICQ info of people not in your contact list. (Thanks, Mark Doliner) committer: Tailor Script diff -r 3ab37015a395 -r 6231e0f0ee9e src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Wed May 22 12:25:44 2002 +0000 +++ b/src/protocols/oscar/oscar.c Thu May 23 00:06:01 2002 +0000 @@ -2503,19 +2503,22 @@ * parse-icq-status-message function knows if it is putting it's message in * an info window because the name will _not_ be in od->evilhack. For getting * only the away message the contact's UIN is put in od->evilhack. */ - if ((budlight = find_buddy(gc, who)) && ((budlight->uc >> 7) & (AIM_ICQ_STATE_AWAY || AIM_ICQ_STATE_DND || AIM_ICQ_STATE_OUT || AIM_ICQ_STATE_BUSY || AIM_ICQ_STATE_CHAT))) { - if (budlight->caps & AIM_CAPS_ICQSERVERRELAY) - g_show_info_text(gc, who, 0, buf, NULL); - else { + if (budlight = find_buddy(gc, who)) { + if ((budlight->uc >> 7) & (AIM_ICQ_STATE_AWAY || AIM_ICQ_STATE_DND || AIM_ICQ_STATE_OUT || AIM_ICQ_STATE_BUSY || AIM_ICQ_STATE_CHAT)) { + if (budlight->caps & AIM_CAPS_ICQSERVERRELAY) + g_show_info_text(gc, who, 0, buf, NULL); + else { + char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); + g_show_info_text(gc, who, 2, buf, "Status: ", state_msg, "
\n

Remote client does not support sending status messages.
\n", NULL); + free(state_msg); + } + } else { char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); - g_show_info_text(gc, who, 2, buf, "Status: ", state_msg, "
\n

Remote client does not support sending status messages.
\n", NULL); + g_show_info_text(gc, who, 2, buf, "Status: ", state_msg, NULL); free(state_msg); } - } else { - char *state_msg = gaim_icq_status((budlight->uc & 0xff80) >> 7); - g_show_info_text(gc, who, 2, buf, "Status: ", state_msg, NULL); - free(state_msg); - } + } else + g_show_info_text(gc, who, 2, buf, NULL); return 1; }