summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-04-30 18:28:24 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-04-30 18:28:24 +0200
commit65faf023679988f93da82b4c7ebdc689f2094459 (patch)
tree6276e7cf3b24878aea695048b48a55a96c538e90
parentc409dbcae3607e6f83f50a28d9bbb51f5ad51be4 (diff)
r300: Don't crash in radeonUpdatePageFlipping when !radeon->glCtx->DrawBuffer.
This feels like a kludge, maybe there's a better solution.
-rw-r--r--src/mesa/drivers/dri/r300/radeon_lock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_lock.c b/src/mesa/drivers/dri/r300/radeon_lock.c
index 84181e2e99e..0d0d9ab7f06 100644
--- a/src/mesa/drivers/dri/r300/radeon_lock.c
+++ b/src/mesa/drivers/dri/r300/radeon_lock.c
@@ -60,7 +60,9 @@ void radeonUpdatePageFlipping(radeonContextPtr radeon)
r300UpdateDrawBuffer(radeon->glCtx);
}
- use_back = (radeon->glCtx->DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_BACK_LEFT);
+ use_back = radeon->glCtx->DrawBuffer ?
+ (radeon->glCtx->DrawBuffer->_ColorDrawBufferMask[0] ==
+ BUFFER_BIT_BACK_LEFT) : 1;
use_back ^= (radeon->sarea->pfCurrentPage == 1);
if (use_back) {