Prevent a null pointer dereference in chat_account_filter_func() if called

Mon, 17 May 2010 00:11:01 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Mon, 17 May 2010 00:11:01 +0000
changeset 30267
ba6674f1cff1
parent 30266
5eb39cfb872a
child 30268
f2c6c7b4c7d0

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

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- 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);

mercurial