[Mesa-dev] [PATCH] glsl: fix cut-n-paste error in error handling.

Dave Airlie airlied at gmail.com
Fri Nov 30 00:34:09 PST 2012


Reported by coverity scan.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/glsl/ir_validate.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index af0b576..5ac0ad3 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -120,7 +120,7 @@ ir_visitor_status
 ir_validate::visit_leave(ir_loop *ir)
 {
    if (ir->counter != NULL) {
-      if ((ir->from == NULL) || (ir->from == NULL) || (ir->increment == NULL)) {
+      if ((ir->from == NULL) || (ir->to == NULL) || (ir->increment == NULL)) {
 	 printf("ir_loop has invalid loop controls:\n"
 		"    counter:   %p\n"
 		"    from:      %p\n"
-- 
1.7.11.7



More information about the mesa-dev mailing list