From 038e981cacdc6f32588442666cde8a8fc16cfdfc Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 15 Mar 2007 11:11:41 -0600 Subject: add some rb->Data null ptr checks (bug 7205) --- src/mesa/swrast/s_accum.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast/s_accum.c') diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 69e9404c55c..f53e7f52c5e 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); -- cgit v1.2.3