glsl: Add assert to check input to strcmp.
authorVinson Lee <vlee@vmware.com>
Thu, 4 Mar 2010 08:53:52 +0000 (00:53 -0800)
committerVinson Lee <vlee@vmware.com>
Thu, 4 Mar 2010 08:53:52 +0000 (00:53 -0800)
src/mesa/shader/slang/slang_builtin.c

index f0659a8..791e751 100644 (file)
@@ -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;
       }