diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mesa/swrast/s_accum.c | 4 | ||||
| -rw-r--r-- | src/mesa/swrast/s_depth.c | 2 | ||||
| -rw-r--r-- | src/mesa/swrast/s_stencil.c | 2 | 
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 69e9404c55..f53e7f52c5 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -136,7 +136,9 @@ _swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )        return;     } -   assert(rb); +   if (!rb || !rb->Data) +      return; +     assert(rb->_BaseFormat == GL_RGBA);     /* add other types in future? */     assert(rb->DataType == GL_SHORT || rb->DataType == GL_UNSIGNED_SHORT); diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 408174c990..dde2b1db83 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1350,7 +1350,7 @@ _swrast_clear_depth_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )     GLuint clearValue;     GLint x, y, width, height; -   if (!rb || !ctx->Depth.Mask) { +   if (!rb || !ctx->Depth.Mask || !rb->Data) {        /* no depth buffer, or writing to it is disabled */        return;     } diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index a8aa1d4b6d..43475c0e81 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1154,7 +1154,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )     const GLuint stencilMax = (1 << stencilBits) - 1;     GLint x, y, width, height; -   if (!rb || mask == 0) +   if (!rb || mask == 0 || !rb->Data)        return;     ASSERT(rb->DataType == GL_UNSIGNED_BYTE ||  | 
