swrast: Fix crash when sampling from a non-existing texture object
authorNicolai Haehnle <nhaehnle@gmail.com>
Sat, 24 Mar 2007 13:41:59 +0000 (14:41 +0100)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sat, 24 Mar 2007 13:42:49 +0000 (14:42 +0100)
src/mesa/swrast/s_context.c

index 1c9a098a2d5d8465cbac90f628a9fbdb805c6a1f..f5f04b05f5a2f1a0cbe1d34ca3da8091683852dd 100644 (file)
@@ -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);
    }
 }