Don't crash if active_tips_data is NULL. (#382904, Li Yuan)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 12 Mar 2007 02:51:40 +0000 (02:51 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 12 Mar 2007 02:51:40 +0000 (02:51 +0000)
2007-03-11  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window):
        Don't crash if active_tips_data is NULL.  (#382904, Li Yuan)

2

svn path=/trunk/; revision=17483

ChangeLog
gtk/gtktooltips.c

index 746361fa8af28739d6333b6017d307203b3c4602..42f2353ee1b6ea458e4f02e6625bb084f2fde0f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-11  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window):
+       Don't crash if active_tips_data is NULL.  (#382904, Li Yuan)
+
 2007-03-11  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_set_buffer): Set first_para_mark
index 458f9e4109d90c87a0ab8b3c0758d9348033fe2f..bb41f14325967e7bfe0541db403f47529e411bb5 100644 (file)
@@ -779,7 +779,7 @@ gtk_tooltips_get_info_from_tip_window (GtkWindow    *tip_window,
   if (tooltips)
     *tooltips = current_tooltips;
   if (current_widget)
-    *current_widget = has_tips ? current_tooltips->active_tips_data->widget : NULL;
+    *current_widget = (has_tips && current_tooltips->active_tips_data) ? current_tooltips->active_tips_data->widget : NULL;
 
   return has_tips;
 }