Mercurial > pidgin
diff libpurple/blist.c @ 16770:8a5fe6db7750
We don't really need an active connection to get the name of a chat.
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Wed, 02 May 2007 03:51:51 +0000 |
| parents | 52342adf4303 |
| children | c4460fa22886 |
line wrap: on
line diff
--- a/libpurple/blist.c Wed May 02 03:41:22 2007 +0000 +++ b/libpurple/blist.c Wed May 02 03:51:51 2007 +0000 @@ -2037,15 +2037,18 @@ struct proto_chat_entry *pce; GList *parts; char *ret; + PurplePlugin *prpl; + PurplePluginProtocolInfo *prpl_info = NULL; g_return_val_if_fail(chat != NULL, NULL); if ((chat->alias != NULL) && (*chat->alias != '\0')) return chat->alias; - if (chat->account->gc == NULL) - return NULL; - - parts = PURPLE_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->chat_info(chat->account->gc); + + prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account)); + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); + + parts = prpl_info->chat_info(chat->account->gc); pce = parts->data; ret = g_hash_table_lookup(chat->components, pce->identifier); g_list_foreach(parts, (GFunc)g_free, NULL);
