ir_to_mesa: Don't assume that an ir_dereference_array is of a variable.

Fixes:
glsl-array-bounds-02 (software)
glsl-array-bounds-04
glsl-array-bounds-06 (software)
glsl-array-bounds-08
This commit is contained in:
Eric Anholt
2010-08-26 11:23:09 -07:00
parent 2db7bb9c66
commit 264ba1ab88
+2 -1
View File
@@ -1382,7 +1382,8 @@ ir_to_mesa_visitor::visit(ir_dereference_array *ir)
return;
}
if (strncmp(var->name, "gl_", 3) == 0 && var->mode == ir_var_uniform &&
if (var &&
strncmp(var->name, "gl_", 3) == 0 && var->mode == ir_var_uniform &&
!var->type->is_matrix()) {
ir_dereference_record *record = NULL;
if (ir->array->ir_type == ir_type_dereference_record)