From: Vinson Lee Date: Thu, 4 Mar 2010 08:53:52 +0000 (-0800) Subject: glsl: Add assert to check input to strcmp. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df20c3943ab4e20055f8e731f112aa9fd8d66068;p=mesa.git glsl: Add assert to check input to strcmp. --- diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index f0659a8d8bb..791e751526d 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -182,6 +182,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[1] = 0; else tokens[1] = 1; + assert(field); if (strcmp(field, "emission") == 0) { tokens[2] = STATE_EMISSION; }