Mesa (master): glsl: Assert input to strcmp is not null.
Vinson Lee
vlee at kemper.freedesktop.org
Sat Feb 27 08:32:05 UTC 2010
Module: Mesa
Branch: master
Commit: 24a8b470ba592b4eb3560f7c5762e17ec0977a51
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=24a8b470ba592b4eb3560f7c5762e17ec0977a51
Author: Vinson Lee <vlee at vmware.com>
Date: Sat Feb 27 00:31:14 2010 -0800
glsl: Assert input to strcmp is not null.
---
src/mesa/shader/slang/slang_builtin.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c
index 0a9f0b9..5533cc5 100644
--- a/src/mesa/shader/slang/slang_builtin.c
+++ b/src/mesa/shader/slang/slang_builtin.c
@@ -121,6 +121,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
}
else if (strcmp(var, "gl_DepthRange") == 0) {
tokens[0] = STATE_DEPTH_RANGE;
+ assert(field);
if (strcmp(field, "near") == 0) {
*swizzleOut = SWIZZLE_XXXX;
}
More information about the mesa-commit
mailing list