don't crash if texture border is used (unsupported for now)
authorBrian <brian.paul@tungstengraphics.com>
Wed, 17 Oct 2007 16:52:30 +0000 (10:52 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 17 Oct 2007 16:52:30 +0000 (10:52 -0600)
src/mesa/pipe/softpipe/sp_tex_sample.c

index 6ff84119e5fc394c6266b811630cc78831df1b46..78f00b2bf09a145466eeb0878589c5e554a69183 100644 (file)
@@ -799,6 +799,9 @@ sp_get_samples(struct tgsi_sampler *sampler,
                float lodbias,
                float rgba[NUM_CHANNELS][QUAD_SIZE])
 {
+   if (!sampler->texture)
+      return;
+
    switch (sampler->texture->target) {
    case PIPE_TEXTURE_1D:
       sp_get_samples_1d(sampler, s, t, p, lodbias, rgba);