From: Jason Ekstrand Date: Wed, 5 Jun 2019 23:35:14 +0000 (-0500) Subject: glsl/loop_analysis: Don't search for NULL variables in the hash table X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a18ce0b9119898b6d58b8e76495a40a9fe71765;p=mesa.git glsl/loop_analysis: Don't search for NULL variables in the hash table Reviewed-by: Kenneth Graunke --- diff --git a/src/compiler/glsl/loop_analysis.cpp b/src/compiler/glsl/loop_analysis.cpp index e90eb1ccde5..4041a0f66ec 100644 --- a/src/compiler/glsl/loop_analysis.cpp +++ b/src/compiler/glsl/loop_analysis.cpp @@ -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; }