diff options
author | Brian <[email protected]> | 2008-03-12 16:56:12 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-12 16:56:12 -0600 |
commit | 2109ba4c5d22e1f7effa33a6ff26ce587ce46fe3 (patch) | |
tree | 649437f772a62878d787a7e1c8718b3ff6c81082 /src/gallium/drivers | |
parent | d1284d3be2bcf5e1607458cd9fb0d8c32fad13ea (diff) |
i915: handle NULL object in i915_bind_rasterizer_state()
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/i915simple/i915_state.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c index 57b195ea8d7..503c0924003 100644 --- a/src/gallium/drivers/i915simple/i915_state.c +++ b/src/gallium/drivers/i915simple/i915_state.c @@ -668,22 +668,23 @@ i915_create_rasterizer_state(struct pipe_context *pipe, } static void i915_bind_rasterizer_state( struct pipe_context *pipe, - void *setup ) + void *raster ) { struct i915_context *i915 = i915_context(pipe); - i915->rasterizer = (struct i915_rasterizer_state *)setup; + i915->rasterizer = (struct i915_rasterizer_state *)raster; /* pass-through to draw module */ - draw_set_rasterizer_state(i915->draw, i915->rasterizer->templ); + draw_set_rasterizer_state(i915->draw, + (i915->rasterizer ? i915->rasterizer->templ : NULL)); i915->dirty |= I915_NEW_RASTERIZER; } static void i915_delete_rasterizer_state(struct pipe_context *pipe, - void *setup) + void *raster) { - FREE(setup); + FREE(raster); } static void i915_set_vertex_buffer( struct pipe_context *pipe, |