From: Vinson Lee Date: Fri, 7 Jun 2013 06:07:30 +0000 (-0700) Subject: glsl: Fix null check in read_dereference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93534873b08aceb0c1c4bd6794c4d3d96907295d;p=mesa.git glsl: Fix null check in read_dereference. Fixes "Logically dead code" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index b3667124fa8..51534ca7c56 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -886,7 +886,7 @@ ir_reader::read_dereference(s_expression *expr) } ir_rvalue *idx = read_rvalue(s_index); - if (subject == NULL) { + if (idx == NULL) { ir_read_error(NULL, "when reading the index of an array_ref"); return NULL; }