radeonsi: fix a crash when unbinding sampler states

Acked-by: James Zhu <James.Zhu@amd.com>
This commit is contained in:
Marek Olšák 2019-04-08 14:24:48 -04:00
parent 775191cd99
commit 4b63f57cbc
1 changed files with 1 additions and 1 deletions

View File

@ -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++) {