diff options
-rw-r--r-- | src/glsl/ir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 3fc4a9857e2..fb9a50e1aa5 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1074,11 +1074,12 @@ ir_dereference_array::set_array(ir_rvalue *value) ir_dereference_record::ir_dereference_record(ir_rvalue *value, const char *field) { + assert(value != NULL); + this->ir_type = ir_type_dereference_record; this->record = value; this->field = ralloc_strdup(this, field); - this->type = (this->record != NULL) - ? this->record->type->field_type(field) : glsl_type::error_type; + this->type = this->record->type->field_type(field); } @@ -1090,8 +1091,7 @@ ir_dereference_record::ir_dereference_record(ir_variable *var, this->ir_type = ir_type_dereference_record; this->record = new(ctx) ir_dereference_variable(var); this->field = ralloc_strdup(this, field); - this->type = (this->record != NULL) - ? this->record->type->field_type(field) : glsl_type::error_type; + this->type = this->record->type->field_type(field); } bool |