From: Nicolai Haehnle Date: Sat, 24 Mar 2007 13:41:59 +0000 (+0100) Subject: swrast: Fix crash when sampling from a non-existing texture object X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f90822b7264a6e569707fb187a77de57a6e6dac;p=mesa.git swrast: Fix crash when sampling from a non-existing texture object --- diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 1c9a098a2d5..f5f04b05f5a 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -505,9 +505,7 @@ _swrast_update_texture_samplers(GLcontext *ctx) for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) { const struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current; - if (tObj) - swrast->TextureSample[u] = - _swrast_choose_texture_sample_func(ctx, tObj); + swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj); } }