From 8f90822b7264a6e569707fb187a77de57a6e6dac Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Sat, 24 Mar 2007 14:41:59 +0100 Subject: [PATCH] swrast: Fix crash when sampling from a non-existing texture object --- src/mesa/swrast/s_context.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); } } -- 2.11.0