changeset 30376:39c1720db373

Prevent a null pointer dereference in chat_account_filter_func() if called on a disconnected or disconnecting account. This should fix https://bugzilla.redhat.com/show_bug.cgi?id=592750
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 17 May 2010 00:11:01 +0000
parents 04c84a3f9553
children b06f69ada7a5
files pidgin/gtkblist.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sun May 16 20:56:47 2010 +0000
+++ b/pidgin/gtkblist.c	Mon May 17 00:11:01 2010 +0000
@@ -942,6 +942,9 @@
 	PurpleConnection *gc = purple_account_get_connection(account);
 	PurplePluginProtocolInfo *prpl_info = NULL;
 
+	if (gc == NULL)
+		return FALSE;
+
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
 
 	return (prpl_info->chat_info != NULL);