summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_accum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_accum.c')
-rw-r--r--src/mesa/swrast/s_accum.c4
1 files changed, 3 insertions, 1 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);