summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-15 14:44:11 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:46 +0000
commit755037e09d753a4bee5daf2532da7b35f1e457c1 (patch)
tree3f9602853b5e0af5978bd884a691650cd2816caa /src
parent7004afcd247f82664ff9a0a73d1991bf9e38ce26 (diff)
zink: don't crash when setting rast-state to NULL
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/zink/zink_state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c
index 814e1e29b6c..709627079d8 100644
--- a/src/gallium/drivers/zink/zink_state.c
+++ b/src/gallium/drivers/zink/zink_state.c
@@ -406,7 +406,9 @@ zink_bind_rasterizer_state(struct pipe_context *pctx, void *cso)
{
struct zink_context *ctx = zink_context(pctx);
ctx->rast_state = cso;
- ctx->gfx_pipeline_state.rast_state = &ctx->rast_state->hw_state;
+
+ if (ctx->rast_state)
+ ctx->gfx_pipeline_state.rast_state = &ctx->rast_state->hw_state;
}
static void