radeonsi: fix a crash when unbinding sampler states
Acked-by: James Zhu <James.Zhu@amd.com>
This commit is contained in:
parent
775191cd99
commit
4b63f57cbc
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue