diff options
author | Marek Olšák <[email protected]> | 2014-01-08 01:07:20 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-01-13 15:48:08 +0100 |
commit | 9677cfab323ef0a24b40711895333685c63258ac (patch) | |
tree | 70857cb6bb3959e28ec29bc89fb35d0c82556d27 /src/gallium/auxiliary/util/u_clear.h | |
parent | 9baa45f78b8ca7d66280e36009b6a685055d7cd6 (diff) |
gallium/util: easy fixes for NULL colorbuffers
Reviewed-by: Brian Paul <[email protected]>
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); + } } } |