diff pidgin/gtkroomlist.c @ 24543:c1f954e51389

Fix a crash that happens when accessing the roomlist for an account that's not connected. Fixes #7707. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author Paul Aurich <paul@darkrain42.org>
date Sat, 06 Dec 2008 05:14:07 +0000
parents e97ff340bbf3
children deb4203bef67
line wrap: on
line diff
--- a/pidgin/gtkroomlist.c	Sat Dec 06 05:05:02 2008 +0000
+++ b/pidgin/gtkroomlist.c	Sat Dec 06 05:14:07 2008 +0000
@@ -488,7 +488,7 @@
 	PurpleConnection *conn = purple_account_get_connection(account);
 	PurplePluginProtocolInfo *prpl_info = NULL;
 
-	if (conn)
+	if (conn && PURPLE_CONNECTION_IS_CONNECTED(conn))
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(conn->prpl);
 
 	return (prpl_info && prpl_info->roomlist_get_list != NULL);