From: Kenneth Graunke Date: Wed, 10 Jan 2018 08:21:56 +0000 (-0800) Subject: iris: fix crash - CSO binding can be NULL (when destroying context) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9367c44639ba5850b03a299b673cd7ece3e85f3c;p=mesa.git iris: fix crash - CSO binding can be NULL (when destroying context) --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index f161598292f..b581c043fce 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -566,7 +566,7 @@ iris_bind_rasterizer_state(struct pipe_context *ctx, void *state) struct iris_rasterizer_state *old_cso = ice->state.cso_rast; struct iris_rasterizer_state *new_cso = state; - if (old_cso) { + if (old_cso && new_cso) { /* Try to avoid re-emitting 3DSTATE_LINE_STIPPLE, it's non-pipelined */ if (old_cso->line_stipple_factor != new_cso->line_stipple_factor || old_cso->line_stipple_pattern != new_cso->line_stipple_pattern) {