From b27fa2c257ccc49c6f29a20a3e672ebaaf58e7aa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 4 Mar 2007 17:15:45 -0800 Subject: Fix a crash with XAA and DRI disabled after the allocation rework. --- src/i830_xaa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i830_xaa.c b/src/i830_xaa.c index f0951387..9ecf7067 100644 --- a/src/i830_xaa.c +++ b/src/i830_xaa.c @@ -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; } -- cgit v1.2.3