diff options
Diffstat (limited to 'src/gallium/auxiliary/util/u_clear.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_clear.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_clear.h b/src/gallium/auxiliary/util/u_clear.h index 75047c16b93..bd8efdb4ad2 100644 --- a/src/gallium/auxiliary/util/u_clear.h +++ b/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); + } } } |