diff options
author | Dave Airlie <[email protected]> | 2019-05-20 11:05:15 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-05-20 16:26:48 +1000 |
commit | 6b2b150a66fbf648521c5dcc6ad9cbb76c55e511 (patch) | |
tree | 2a857d5bce15dbe9e1f820dd6b7f7ec536134bcf /src/compiler | |
parent | a1d419603f757e8a8533f2fbf1dd136420acbd28 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_validate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 8278176564f..b087b0da12d 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -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); } |