diff options
author | Corbin Simpson <[email protected]> | 2010-01-11 20:27:54 -0800 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2010-01-11 20:54:11 -0800 |
commit | 22d615a9c4b95c528d6604eccb71cf6fe5193d5a (patch) | |
tree | 4e87c4727b8be01834fb9cc1d6e2bb21ed6ded25 /src/gallium/drivers/r300/r300_state.c | |
parent | fe0e627685664087e3cc8244b0212a7142b1b4ca (diff) |
r300g: Avoid segfault on binding null RS state.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 78764ddc98e..4c22d4ebc45 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -717,7 +717,11 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state) draw_set_rasterizer_state(r300->draw, &rs->rs); } - r300->tcl_bypass = rs->rs.bypass_vs_clip_and_viewport; + if (rs) { + r300->tcl_bypass = rs->rs.bypass_vs_clip_and_viewport; + } else { + r300->tcl_bypass = FALSE; + } r300->rs_state.state = rs; r300->rs_state.dirty = TRUE; |