]> Pileus Git - ~andy/gtk/commitdiff
Check for grip_window != NULL in gtk_window_draw
authorMatthias Clasen <mclasen@redhat.com>
Sat, 9 Oct 2010 00:17:51 +0000 (20:17 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 9 Oct 2010 00:19:24 +0000 (20:19 -0400)
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

index 397e41bfac9abea5b4383e5a80f852e3c0ac7da9..03e096c0d4ec61861d5d84c1c844fc0b2031eb34 100644 (file)
@@ -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;