comparison pidgin/gtkconv.c @ 23283:e965a497ddfb

Don't try to retrieve the chat_info_defaults while signed off, it tends to crash.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 03 Jun 2008 23:51:12 +0000
parents d54bc04bfd31
children 398f84dd4041 d201287d3a0e
comparison
equal deleted inserted replaced
23282:62b5d52c3d66 23283:e965a497ddfb
3154 if ((chat == NULL) && (gtkconv->imhtml != NULL)) { 3154 if ((chat == NULL) && (gtkconv->imhtml != NULL)) {
3155 GHashTable *components; 3155 GHashTable *components;
3156 PurpleAccount *account = purple_conversation_get_account(conv); 3156 PurpleAccount *account = purple_conversation_get_account(conv);
3157 PurplePlugin *prpl = purple_find_prpl(purple_account_get_protocol_id(account)); 3157 PurplePlugin *prpl = purple_find_prpl(purple_account_get_protocol_id(account));
3158 PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); 3158 PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
3159 if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_info_defaults)) { 3159 if (purple_account_get_connection(account) != NULL &&
3160 PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_info_defaults)) {
3160 components = prpl_info->chat_info_defaults(purple_account_get_connection(account), 3161 components = prpl_info->chat_info_defaults(purple_account_get_connection(account),
3161 purple_conversation_get_name(conv)); 3162 purple_conversation_get_name(conv));
3162 } else { 3163 } else {
3163 components = g_hash_table_new_full(g_str_hash, g_str_equal, 3164 components = g_hash_table_new_full(g_str_hash, g_str_equal,
3164 g_free, g_free); 3165 g_free, g_free);