aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/samplerobj.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-13 10:11:17 +0200
committermarha <marha@users.sourceforge.net>2012-08-13 10:11:17 +0200
commitf5a4fa87e844b3ea2658a2355a4c4ac3393a65a1 (patch)
tree921a5a742930124e7bd7e9a7e73f6029bd74338d /mesalib/src/mesa/main/samplerobj.h
parentec4051f308e8e84146e0ecc39b6d228e500e9636 (diff)
parent9ddf44af81782451cee798e06749ce3067a14a41 (diff)
downloadvcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.gz
vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.bz2
vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/samplerobj.h')
-rw-r--r--mesalib/src/mesa/main/samplerobj.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/samplerobj.h b/mesalib/src/mesa/main/samplerobj.h
index 2b0cd7946..e70ee4881 100644
--- a/mesalib/src/mesa/main/samplerobj.h
+++ b/mesalib/src/mesa/main/samplerobj.h
@@ -33,8 +33,10 @@ _mesa_get_samplerobj(struct gl_context *ctx, GLuint unit)
{
if (ctx->Texture.Unit[unit].Sampler)
return ctx->Texture.Unit[unit].Sampler;
- else
+ else if (ctx->Texture.Unit[unit]._Current)
return &ctx->Texture.Unit[unit]._Current->Sampler;
+ else
+ return NULL;
}