Commit 5245d845 authored by Rob Clark's avatar Rob Clark

nir/validate: fix null deref coverity warning

CID 1265536 (#1 of 2): Explicit null dereferenced (FORWARD_NULL)6.
var_deref_op: Dereferencing null pointer parent.
Signed-off-by: default avatarRob Clark <robclark@freedesktop.org>
Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
parent 0cbc90c5
......@@ -376,6 +376,7 @@ validate_deref_chain(nir_deref *deref, validate_state *state)
break;
case nir_deref_type_struct:
assume(parent); /* cannot happen: deref change starts w/ nir_deref_var */
validate_assert(state, deref->type ==
glsl_get_struct_field(parent->type,
nir_deref_as_struct(deref)->index));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment