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-Tag: upstream/19.3.0~5763 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a18ce0b9119898b6d58b8e76495a40a9fe71765;p=platform%2Fupstream%2Fmesa.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 e90eb1c..4041a0f 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; }