aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_reader.cpp
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2013-06-06 23:07:30 -0700
committerVinson Lee <[email protected]>2013-06-13 22:13:34 -0700
commit93534873b08aceb0c1c4bd6794c4d3d96907295d (patch)
treece1e51d7d8aafc57bde61745a96c2f510a5edd38 /src/glsl/ir_reader.cpp
parent399548b17fcc679d293920f1088c50004babfc92 (diff)
glsl: Fix null check in read_dereference.
Fixes "Logically dead code" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r--src/glsl/ir_reader.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}