diff options
author | José Fonseca <[email protected]> | 2010-02-10 11:25:26 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-02-10 11:25:26 +0000 |
commit | ba33fed6106609ed04612b46011e28fab69d2310 (patch) | |
tree | 192f8541b7f097c0b343ecb4637994051a1bd3e0 /src/gallium/drivers/llvmpipe | |
parent | 5e6a9005100ec2636ce9734a5e4535216494cf60 (diff) |
llvmpipe: Fix null pointer dereference when no depth buffer is bound.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_priv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 4760d337c64..5c5497e0929 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -139,6 +139,9 @@ lp_rast_depth_pointer( struct lp_rasterizer *rast, void * depth; assert((x % TILE_VECTOR_WIDTH) == 0); assert((y % TILE_VECTOR_HEIGHT) == 0); + if(!rast->zsbuf_map) + return NULL; + assert(rast->zsbuf_transfer); depth = rast->zsbuf_map + y*rast->zsbuf_transfer->stride + TILE_VECTOR_HEIGHT*x*util_format_get_blocksize(rast->zsbuf_transfer->texture->format); |