changeset 23281: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 62b5d52c3d66
children e6bf03f33eb7
files pidgin/gtkconv.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Tue Jun 03 23:47:24 2008 +0000
+++ b/pidgin/gtkconv.c	Tue Jun 03 23:51:12 2008 +0000
@@ -3156,7 +3156,8 @@
 			PurpleAccount *account = purple_conversation_get_account(conv);
 			PurplePlugin *prpl = purple_find_prpl(purple_account_get_protocol_id(account));
 			PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
-			if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_info_defaults)) {
+			if (purple_account_get_connection(account) != NULL &&
+					PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_info_defaults)) {
 				components = prpl_info->chat_info_defaults(purple_account_get_connection(account),
 						purple_conversation_get_name(conv));
 			} else {