From 4b63f57cbc40b2dbb5ae4c6a8656a52f974a7017 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 8 Apr 2019 14:24:48 -0400 Subject: [PATCH] radeonsi: fix a crash when unbinding sampler states Acked-by: James Zhu --- src/gallium/drivers/radeonsi/si_descriptors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 244ba5a7bec..ac40ed27f91 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -949,7 +949,7 @@ static void si_bind_sampler_states(struct pipe_context *ctx, struct si_sampler_state **sstates = (struct si_sampler_state**)states; int i; - if (!count || shader >= SI_NUM_SHADERS) + if (!count || shader >= SI_NUM_SHADERS || !sstates) return; for (i = 0; i < count; i++) { -- 2.30.2