r300: Check ctx->WinSysDrawBuffer before calling function that dereferences it.
authorMichel Dänzer <michel@tungstengraphics.com>
Tue, 27 Mar 2007 07:19:51 +0000 (09:19 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Tue, 27 Mar 2007 07:44:32 +0000 (09:44 +0200)
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10417 .

src/mesa/drivers/dri/r300/radeon_lock.c

index 1a2dfca7b0daa0f7ac0d6872bd4a69844d5e4230..b331cfae6af4efab236b0e61684946418459d301 100644 (file)
@@ -55,7 +55,7 @@ static void radeonUpdatePageFlipping(radeonContextPtr radeon)
        int use_back;
 
        radeon->doPageFlip = radeon->sarea->pfState;
-        if (!radeon->doPageFlip) {
+        if (!radeon->doPageFlip && radeon->glCtx->WinSysDrawBuffer) {
            driFlipRenderbuffers(radeon->glCtx->WinSysDrawBuffer, GL_FALSE);
         }