[gtk+] Check for grip_window != NULL in gtk_window_draw



commit 2f8f0d8eabf8c6f447874f8991fb04f64d8c585b
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 8 20:17:51 2010 -0400

    Check for grip_window != NULL in gtk_window_draw
    
    This is safer, since GtkWindow subclasses may override realize
    and end up with has_resize_grip == TRUE, but grip_window still
    being NULL - as is the case with GtkPlug.

 gtk/gtkwindow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 397e41b..03e096c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7131,7 +7131,7 @@ gtk_window_draw (GtkWidget *widget,
   if (GTK_WIDGET_CLASS (gtk_window_parent_class)->draw)
     ret = GTK_WIDGET_CLASS (gtk_window_parent_class)->draw (widget, cr);
 
-  if (priv->has_resize_grip &&
+  if (priv->grip_window != NULL &&
       gtk_cairo_should_draw_window (cr, priv->grip_window))
     {
       GdkRectangle rect;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]