diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/samplerobj.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index 2b0cd794665..e70ee4881ad 100644 --- a/src/mesa/main/samplerobj.h +++ b/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; } |