glsl: Add assert to check input to strcmp.

This commit is contained in:
Vinson Lee
2010-03-02 01:10:29 -08:00
parent 247008f6c2
commit 8462fe2bbf
+1
View 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;