diff options
author | Julien Cristau <[email protected]> | 2007-05-09 15:09:12 +0200 |
---|---|---|
committer | Julien Cristau <[email protected]> | 2007-05-09 15:09:12 +0200 |
commit | a8c856d43c1594953a725f63e9c24d5bb658efda (patch) | |
tree | 9b0d4ae561561d2cadccd17dec18d534dff60f07 /src | |
parent | 1953cfc9542dafe2b92d2c9a0da819513ee2c1a4 (diff) |
Cherry-pick commmit 65faf023 by Michel Dänzer to fix r300 crash.
r300: Don't crash in radeonUpdatePageFlipping when !radeon->glCtx->DrawBuffer.
This feels like a kludge, maybe there's a better solution.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_lock.c | 4 |
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 ec501c3dc06..a5f6ec7d662 100644 --- a/src/mesa/drivers/dri/r300/radeon_lock.c +++ b/src/mesa/drivers/dri/r300/radeon_lock.c @@ -59,7 +59,9 @@ static void radeonUpdatePageFlipping(radeonContextPtr radeon) driFlipRenderbuffers(radeon->glCtx->WinSysDrawBuffer, radeon->sarea->pfCurrentPage); } - 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) { |