Commit 6b2b150a authored by Dave Airlie's avatar Dave Airlie

nir/validate: fix crash if entry is null.

we validate assert entry just before this, but since that doesn't
stop execution, we need to check entry before the next validation
assert.
Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
parent a1d41960
Pipeline #37732 passed with stages
in 7 minutes and 46 seconds
......@@ -388,7 +388,7 @@ validate_var_use(nir_variable *var, validate_state *state)
{
struct hash_entry *entry = _mesa_hash_table_search(state->var_defs, var);
validate_assert(state, entry);
if (var->data.mode == nir_var_function_temp)
if (entry && var->data.mode == nir_var_function_temp)
validate_assert(state, (nir_function_impl *) entry->data == state->impl);
}
......
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