From 24a8b470ba592b4eb3560f7c5762e17ec0977a51 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 27 Feb 2010 00:31:14 -0800 Subject: glsl: Assert input to strcmp is not null. --- src/mesa/shader/slang/slang_builtin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 0a9f0b97fb..5533cc5b65 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; } -- cgit v1.2.3