From 5a1a2cf44c8ecb429708128a5399eaaff6449f8c Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 24 May 2007 15:54:23 +0000 Subject: [PATCH] apply patch from Bogdan Nicula which fixes a crash on GdkWindows which 2007-05-24 Michael Natterer * gtk/gtktooltip.c (find_widget_under_pointer): apply patch from Bogdan Nicula which fixes a crash on GdkWindows which have no GtkWidget as user_data (bug #440890). svn path=/trunk/; revision=17906 --- ChangeLog | 6 ++++++ gtk/gtktooltip.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43966620ca..3725c45488 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-24 Michael Natterer + + * gtk/gtktooltip.c (find_widget_under_pointer): apply patch from + Bogdan Nicula which fixes a crash on GdkWindows which have no + GtkWidget as user_data (bug #440890). + 2007-05-24 Matthias Clasen * configure.in: Bump version diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index bfcf7436bf..d612da5bfa 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -461,11 +461,14 @@ find_widget_under_pointer (GdkWindow *window, GtkWidget *event_widget; struct ChildLocation child_loc = { NULL, NULL, 0, 0 }; + gdk_window_get_user_data (window, (void **)&event_widget); + + if (!event_widget) + return NULL; + child_loc.x = *x; child_loc.y = *y; - gdk_window_get_user_data (window, (void **)&event_widget); - while (window && window != event_widget->window) { gint px, py;