diff options
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_clear.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_clear.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_clear.h b/mesalib/src/gallium/auxiliary/util/u_clear.h index 75047c16b..bd8efdb4a 100644 --- a/mesalib/src/gallium/auxiliary/util/u_clear.h +++ b/mesalib/src/gallium/auxiliary/util/u_clear.h @@ -47,7 +47,10 @@ util_clear(struct pipe_context *pipe, for (i = 0; i < framebuffer->nr_cbufs; i++) { if (buffers & (PIPE_CLEAR_COLOR0 << i)) { struct pipe_surface *ps = framebuffer->cbufs[i]; - pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, ps->height); + + if (ps) { + pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, ps->height); + } } } |