i915: check for NULL const buffer ptr
authorBrian <brian.paul@tungstengraphics.com>
Fri, 14 Mar 2008 16:23:11 +0000 (10:23 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 14 Mar 2008 16:23:56 +0000 (10:23 -0600)
src/gallium/drivers/i915simple/i915_state.c

index 503c092400394390eb873849d16ab8f99777532f..1cec36e206d52456704edbc7650ee7a654f5cb2c 100644 (file)
@@ -516,7 +516,7 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
     * stays the same.  In that case we should only be updating the first
     * N constants, leaving any extras from shader translation alone.
     */
-   {
+   if (buf) {
       void *mapped;
       if (buf->size &&
           (mapped = ws->buffer_map(ws, buf->buffer,