mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
vc4: check instruction before setting flags
This fixes an issue detected by static analyzer: access to field 'sf' results in a dereference of a null pointer (loaded from variable 'last_inst'). Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
This commit is contained in:
parent
72bc74f0be
commit
2c8411e9d2
1 changed files with 3 additions and 1 deletions
|
|
@ -809,7 +809,9 @@ qir_SF(struct vc4_compile *c, struct qreg src)
|
|||
last_inst != c->defs[src.index]) {
|
||||
last_inst = qir_MOV_dest(c, qir_reg(QFILE_NULL, 0), src);
|
||||
}
|
||||
last_inst->sf = true;
|
||||
|
||||
if (last_inst)
|
||||
last_inst->sf = true;
|
||||
}
|
||||
|
||||
#define OPTPASS(func) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue