[Mesa-dev] [PATCH] glsl: Fix null check in read_dereference.
Vinson Lee
vlee at freedesktop.org
Thu Jun 6 23:11:49 PDT 2013
Fixes "Logically dead code" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
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 b366712..51534ca 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;
}
--
1.8.2.1
More information about the mesa-dev
mailing list