glsl: Assert input to strcmp is not null.
authorVinson Lee <vlee@vmware.com>
Sat, 27 Feb 2010 08:31:14 +0000 (00:31 -0800)
committerVinson Lee <vlee@vmware.com>
Sat, 27 Feb 2010 08:31:14 +0000 (00:31 -0800)
src/mesa/shader/slang/slang_builtin.c

index 0a9f0b9..5533cc5 100644 (file)
@@ -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;
       }