mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
glsl: don't crash if a field is specified for a non-struct uniform
This was triggered by the previous bug, but is a separate problem in the general sense.
This commit is contained in:
parent
c108a7927d
commit
fc76d72763
1 changed files with 1 additions and 1 deletions
|
|
@ -1145,7 +1145,7 @@ get_builtin_uniform_reg(struct gl_program *prog,
|
|||
if (!field && statevars[i].field) {
|
||||
assert(!"FINISHME: whole-structure state var dereference");
|
||||
}
|
||||
if (field && strcmp(statevars[i].field, field) != 0)
|
||||
if (field && (!statevars[i].field || strcmp(statevars[i].field, field) != 0))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue