Fix a crash with XAA and DRI disabled after the allocation rework.

This commit is contained in:
Eric Anholt 2007-03-04 17:15:45 -08:00
parent fc7d43c2b6
commit b27fa2c257
1 changed files with 4 additions and 2 deletions

View File

@ -279,12 +279,14 @@ CheckTiling(ScrnInfoPtr pScrn)
if (IS_I965G(pI830)) {
if (pI830->bufferOffset == pScrn->fbOffset && pI830->front_tiled == FENCE_XMAJOR)
tiled = 1;
if (pI830->bufferOffset == pI830->back_buffer->offset &&
if (pI830->back_buffer != NULL &&
pI830->bufferOffset == pI830->back_buffer->offset &&
pI830->back_tiled == FENCE_XMAJOR) {
tiled = 1;
}
/* not really supported as it's always YMajor tiled */
if (pI830->bufferOffset == pI830->depth_buffer->offset &&
if (pI830->depth_buffer != NULL &&
pI830->bufferOffset == pI830->depth_buffer->offset &&
pI830->depth_tiled == FENCE_XMAJOR) {
tiled = 1;
}