[Mesa-dev] [PATCH] glsl: Fix null check in read_dereference.
Brian Paul
brianp at vmware.com
Fri Jun 7 08:20:28 PDT 2013
On 06/06/2013 11:11 PM, Vinson Lee wrote:
> 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;
> }
>
Candidate for stable branches?
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list