# HG changeset patch # User Christian Hammond # Date 1052608254 0 # Node ID a6146cbae03b160b558dceca07c97c536dd538ed # Parent f6c8595a9a84e5f3797aa4b5589c7a3e9c59e8b4 [gaim-migrate @ 5726] Fixinating the countryside... committer: Tailor Script diff -r f6c8595a9a84 -r a6146cbae03b src/conversation.c --- a/src/conversation.c Sat May 10 18:54:29 2003 +0000 +++ b/src/conversation.c Sat May 10 23:10:54 2003 +0000 @@ -1444,38 +1444,41 @@ !g_list_find(gaim_get_conversations(), conv)) return; - prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl); - - if (gaim_conversation_get_type(conv) == GAIM_CONV_IM || - !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { - - if (who == NULL) { - if (flags & WFLAG_SEND) { - b = gaim_find_buddy(account, account->gc->username); - if (b != NULL && strcmp(b->name, gaim_get_buddy_alias(b))) - who = gaim_get_buddy_alias(b); - else if (*account->alias) - who = account->alias; - else if (*account->gc->displayname) - who = account->gc->displayname; - else - who = account->gc->username; + if (account->gc != NULL) { + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl); + + if (gaim_conversation_get_type(conv) == GAIM_CONV_IM || + !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { + + if (who == NULL) { + if (flags & WFLAG_SEND) { + b = gaim_find_buddy(account, account->gc->username); + if (b != NULL && strcmp(b->name, gaim_get_buddy_alias(b))) + who = gaim_get_buddy_alias(b); + else if (*account->alias) + who = account->alias; + else if (*account->gc->displayname) + who = account->gc->displayname; + else + who = account->gc->username; + } + else { + b = gaim_find_buddy(account, + gaim_conversation_get_name(conv)); + + if (b != NULL) + who = gaim_get_buddy_alias(b); + else + who = gaim_conversation_get_name(conv); + } } else { - b = gaim_find_buddy(account, gaim_conversation_get_name(conv)); + b = gaim_find_buddy(account, who); if (b != NULL) who = gaim_get_buddy_alias(b); - else - who = gaim_conversation_get_name(conv); } } - else { - b = gaim_find_buddy(account, who); - - if (b != NULL) - who = gaim_get_buddy_alias(b); - } } ops->write_conv(conv, who, message, length, flags, mtime);