diff options
Diffstat (limited to 'src/mesa/swrast/s_depth.c')
-rw-r--r-- | src/mesa/swrast/s_depth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 1a428fb1a2..17e00dda4f 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1238,6 +1238,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb, if (!rb) { /* really only doing this to prevent FP exceptions later */ _mesa_bzero(depth, n * sizeof(GLfloat)); + return; } ASSERT(rb->_BaseFormat == GL_DEPTH_COMPONENT); @@ -1300,7 +1301,8 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb, { if (!rb) { /* really only doing this to prevent FP exceptions later */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + _mesa_bzero(depth, n * sizeof(GLuint)); + return; } ASSERT(rb->_BaseFormat == GL_DEPTH_COMPONENT); |