glsl/loop_analysis: Don't search for NULL variables in the hash table

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand 2019-06-05 18:35:14 -05:00
parent d96878a66a
commit 7a18ce0b91

View file

@ -288,6 +288,9 @@ loop_state::get(const ir_loop *ir)
loop_variable *
loop_variable_state::get(const ir_variable *ir)
{
if (ir == NULL)
return NULL;
hash_entry *entry = _mesa_hash_table_search(this->var_hash, ir);
return entry ? (loop_variable *) entry->data : NULL;
}