From 2a8be448e359a67afa35d71ef15ca6282b3a86ed Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Tue, 17 Jul 2007 12:39:20 +0000 Subject: [PATCH] only do the coordinate check if tmp is not NULL. 2007-07-17 Kristian Rietveld * gtk/gtktooltip.c (find_widget_under_pointer): only do the coordinate check if tmp is not NULL. svn path=/trunk/; revision=18486 --- ChangeLog | 5 +++++ gtk/gtktooltip.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4599acf4b7..14a723adad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-17 Kristian Rietveld + + * gtk/gtktooltip.c (find_widget_under_pointer): only do the + coordinate check if tmp is not NULL. + 2007-07-16 Kristian Rietveld * gtk/gtktooltip.c (find_topmost_widget_coords_from_event): check diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 68ad4ceee8..c6062053ae 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -594,7 +594,8 @@ find_topmost_widget_coords_from_event (GdkEvent *event, tmp = find_widget_under_pointer (event->any.window, &tx, &ty); /* Make sure the pointer can actually be on the widget returned */ - if (tx < 0 || tx >= tmp->allocation.width || + if (!tmp || + tx < 0 || tx >= tmp->allocation.width || ty < 0 || ty >= tmp->allocation.height) return NULL;