summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-04-08 14:24:48 -0400
committerMarek Olšák <[email protected]>2019-04-08 15:23:32 -0400
commit4b63f57cbc40b2dbb5ae4c6a8656a52f974a7017 (patch)
treefd73790e03bbdc13df9e40424ecd063e9c1b1582 /src/gallium/drivers/radeonsi
parent775191cd99a772acda37f41790ff09b93c7a00ba (diff)
radeonsi: fix a crash when unbinding sampler states
Acked-by: James Zhu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c2
1 files changed, 1 insertions, 1 deletions
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++) {