Merge branch 'mesa_7_5_branch'
[mesa.git] / src / mesa / drivers / dri / r128 / r128_lock.c
index 393dd1ed74c90bb344a0e587a92929076b8573d4..81488a27424312b307924b70c541a716433e8e60 100644 (file)
@@ -1,4 +1,3 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.c,v 1.5 2002/10/30 12:51:38 alanh Exp $ */
 /**************************************************************************
 
 Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
@@ -52,12 +51,14 @@ static void
 r128UpdatePageFlipping( r128ContextPtr rmesa )
 {
    rmesa->doPageFlip = rmesa->sarea->pfAllowPageFlip;
-   driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
-                        rmesa->sarea->pfCurrentPage);
+   if (rmesa->glCtx->WinSysDrawBuffer) {
+      driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+                           rmesa->sarea->pfCurrentPage);
+   }
    rmesa->new_state |= R128_NEW_WINDOW;
 }
 
-/* Update the hardware state.  This is called if another context has
+/* Update the hardware state.  This is called if another main/context.has
  * grabbed the hardware lock, which includes the X server.  This
  * function also updates the driver's window state after the X server
  * moves, resizes or restacks a window -- the change will be reflected