From 93534873b08aceb0c1c4bd6794c4d3d96907295d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 6 Jun 2013 23:07:30 -0700 Subject: [PATCH] glsl: Fix null check in read_dereference. Fixes "Logically dead code" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- src/glsl/ir_reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2