changeset 22679:84dc71e67a72

Fix a null pointer deref (hopefully). I haven't been able to consistently recreate this, but I think this is the problem.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 16 Apr 2008 21:34:38 +0000
parents 0e3d09819fbf
children dfb1cf26e0c8 a7ef2c82d125
files pidgin/gtkblist.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);