changeset 25330:8a5c0c5c71f9

Jan Kratochvil found another race condition in the treeview tooltip code, this fixes it. Fixes #8069.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 15 Jan 2009 03:56:58 +0000
parents 36897ddd3e08
children 7bfaa0b61a83 6fe309e61bf9 bcedd3b2ca69 1d1d1829de11 94a6eb10c691
files pidgin/pidgintooltip.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/pidgintooltip.c	Thu Jan 15 03:54:58 2009 +0000
+++ b/pidgin/pidgintooltip.c	Thu Jan 15 03:56:58 2009 +0000
@@ -82,7 +82,8 @@
 static void
 destroy_tooltip_data(PidginTooltipData *data)
 {
-	gtk_tree_path_free(data->common.treeview.path);
+	if (data->common.treeview.path)
+		gtk_tree_path_free(data->common.treeview.path);
 	pidgin_tooltip_destroy();
 	g_free(data);
 }
@@ -380,7 +381,7 @@
 
 	g_signal_connect(G_OBJECT(widget), "motion-notify-event", G_CALLBACK(widget_motion_cb), wdata);
 	g_signal_connect(G_OBJECT(widget), "leave-notify-event", G_CALLBACK(widget_leave_cb), NULL);
-	g_signal_connect_swapped(G_OBJECT(widget), "destroy", G_CALLBACK(g_free), wdata);
+	g_signal_connect_swapped(G_OBJECT(widget), "destroy", G_CALLBACK(destroy_tooltip_data), wdata);
 	return TRUE;
 }