From: Erik Faye-Lund Date: Mon, 15 Jul 2019 12:44:11 +0000 (+0200) Subject: zink: don't crash when setting rast-state to NULL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=755037e09d753a4bee5daf2532da7b35f1e457c1;p=mesa.git zink: don't crash when setting rast-state to NULL Acked-by: Jordan Justen --- 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