glsl: Add assert to check input to strcmp.
authorVinson Lee <vlee@vmware.com>
Tue, 2 Mar 2010 09:10:29 +0000 (01:10 -0800)
committerVinson Lee <vlee@vmware.com>
Tue, 2 Mar 2010 09:10:29 +0000 (01:10 -0800)
src/mesa/shader/slang/slang_builtin.c

index 5533cc5b655befa5ecd2a8b7764471441fcfb5db..f0659a8d8bb3cb318d42b761bf85781ef9c086d3 100644 (file)
@@ -142,6 +142,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
       tokens[1] = index1;
    }
    else if (strcmp(var, "gl_Point") == 0) {
+      assert(field);
       if (strcmp(field, "size") == 0) {
          tokens[0] = STATE_POINT_SIZE;
          *swizzleOut = SWIZZLE_XXXX;