diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index f7b87a1811a..6efde5c27f2 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -763,7 +763,7 @@ private: /* Assign explicit locations. */ if (current_var->data.explicit_location) { /* Set sequential locations for struct fields. */ - if (record_type != NULL) { + if (current_var->type->without_array()->is_record()) { const unsigned entries = MAX2(1, this->uniforms[id].array_elements); this->uniforms[id].remap_location = this->explicit_location + field_counter;