glsl: Assert input to strcmp is not null.

This commit is contained in:
Vinson Lee
2010-02-27 00:31:14 -08:00
parent fd29be3831
commit 24a8b470ba
+1
View 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;
}