summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r--src/mesa/main/uniforms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 3b7249aabb5..116fab21cb9 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -1007,7 +1007,7 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name)
shProg = _mesa_lookup_shader_program_err(ctx, programObj,
"glGetUniformLocation");
- if (!shProg)
+ if (!shProg || !name)
return -1;
/* Page 80 (page 94 of the PDF) of the OpenGL 2.1 spec says: