summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_llvm.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-09-30 16:41:31 -0600
committerBrian Paul <[email protected]>2010-09-30 16:42:17 -0600
commit66992463ac294b1a106090250ad2af305f9d8a10 (patch)
tree93f7df9cd4ff3741c946fdb98fcf89aa2dd7b73a /src/gallium/auxiliary/draw/draw_llvm.c
parent542d6cb1b8a87615b4c4498ce1fcbf39d743f963 (diff)
draw: check for null sampler pointers
http://bugs.freedesktop.org/show_bug.cgi?id=30516
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 4749bb57a53..7fb86d7cb27 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -1099,10 +1099,12 @@ draw_llvm_set_sampler_state(struct draw_context *draw)
for (i = 0; i < draw->num_samplers; i++) {
struct draw_jit_texture *jit_tex = &draw->llvm->jit_context.textures[i];
- jit_tex->min_lod = draw->samplers[i]->min_lod;
- jit_tex->max_lod = draw->samplers[i]->max_lod;
- jit_tex->lod_bias = draw->samplers[i]->lod_bias;
- COPY_4V(jit_tex->border_color, draw->samplers[i]->border_color);
+ if (draw->samplers[i]) {
+ jit_tex->min_lod = draw->samplers[i]->min_lod;
+ jit_tex->max_lod = draw->samplers[i]->max_lod;
+ jit_tex->lod_bias = draw->samplers[i]->lod_bias;
+ COPY_4V(jit_tex->border_color, draw->samplers[i]->border_color);
+ }
}
}