Index: gdk/gdkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.c,v
retrieving revision 1.176
diff -p -u -r1.176 gdkwindow.c
--- gdk/gdkwindow.c	16 Jun 2005 05:18:33 -0000	1.176
+++ gdk/gdkwindow.c	27 Jul 2005 02:51:47 -0000
@@ -1779,6 +1779,9 @@ gdk_window_clear_backing_rect (GdkWindow
   if (GDK_WINDOW_DESTROYED (window))
     return;
 
+  if (private->bg_pixmap == GDK_NO_BG)
+    return;
+
   cr = cairo_create (paint->surface);
 
   gdk_window_set_bg_pattern (window, cr, 0, 0);
