From 9367c44639ba5850b03a299b673cd7ece3e85f3c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 10 Jan 2018 00:21:56 -0800 Subject: [PATCH] iris: fix crash - CSO binding can be NULL (when destroying context) --- src/gallium/drivers/iris/iris_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2