From: Vinson Lee Date: Sat, 27 Feb 2010 08:31:14 +0000 (-0800) Subject: glsl: Assert input to strcmp is not null. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24a8b470ba592b4eb3560f7c5762e17ec0977a51;p=mesa.git glsl: Assert input to strcmp is not null. --- diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 0a9f0b97fb9..5533cc5b655 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; }