From: Marek Olšák Date: Mon, 8 Apr 2019 18:24:48 +0000 (-0400) Subject: radeonsi: fix a crash when unbinding sampler states X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b63f57cbc40b2dbb5ae4c6a8656a52f974a7017;p=mesa.git radeonsi: fix a crash when unbinding sampler states Acked-by: James Zhu --- 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++) {