GL: Fix possible shift by -1

This can happen when the attribute has been optimized out by the compiler.
This commit is contained in:
Clément Foucault 2022-02-18 21:33:04 +01:00
parent 7f7c614ecd
commit eba3ffc31a

@ -70,7 +70,7 @@ static uint16_t vbo_bind(const ShaderInterface *interface,
const char *name = GPU_vertformat_attr_name_get(format, a, n_idx);
const ShaderInput *input = interface->attr_get(name);
if (input == nullptr) {
if (input == nullptr || input->location == -1) {
continue;
}