Fix a null pointer deref (hopefully). I haven't been able to consistently

Wed, 16 Apr 2008 21:34:38 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Wed, 16 Apr 2008 21:34:38 +0000
changeset 22822
e82a3ebf132b
parent 22821
7c45c9689f0f
child 22823
ad030cc32c49
child 22824
fba8507310d3

Fix a null pointer deref (hopefully). I haven't been able to consistently
recreate this, but I think this is the problem.

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkblist.c	Wed Apr 16 07:25:47 2008 +0000
+++ b/pidgin/gtkblist.c	Wed Apr 16 21:34:38 2008 +0000
@@ -4436,9 +4436,10 @@
 }
 
 static gboolean
-headline_click_callback(gpointer data)
-{
-	((GSourceFunc)gtkblist->headline_callback)(gtkblist->headline_data);
+headline_click_callback(gpointer unused)
+{
+	if (gtkblist->headline_callback)
+		((GSourceFunc) gtkblist->headline_callback)(gtkblist->headline_data);
 	reset_headline(gtkblist);
 	return FALSE;
 }
@@ -4448,7 +4449,7 @@
 {
 	gtk_widget_hide(gtkblist->headline_hbox);
 	if (gtkblist->headline_callback && !headline_hover_close((int)event->x, (int)event->y))
-		g_idle_add((GSourceFunc)headline_click_callback, gtkblist->headline_data);
+		g_idle_add(headline_click_callback, NULL);
 	else {
 		if (gtkblist->headline_destroy)
 			gtkblist->headline_destroy(gtkblist->headline_data);

mercurial