From 1e287b6fd79635b793d11ea92ff665bc0434d63d Mon Sep 17 00:00:00 2001
From: Luis de Bethencourt <luis.bg@samsung.com>
Date: Wed, 7 Jan 2015 16:26:57 +0000
Subject: [PATCH] handdetect: remove unneeded check

Variable hands is already checked to contain a value previously at the beginning
of the current block (in line 504). There is no need to check again. This is
logically dead code.

CID 1197693
---
 ext/opencv/gsthanddetect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/opencv/gsthanddetect.c b/ext/opencv/gsthanddetect.c
index 1ec29aa4e0..d01a42ee68 100644
--- a/ext/opencv/gsthanddetect.c
+++ b/ext/opencv/gsthanddetect.c
@@ -522,7 +522,7 @@ gst_handdetect_transform_ip (GstOpencvVideoFilter * transform,
       if (filter->prev_r == NULL)
         filter->prev_r = &temp_r;
       /* Get the best PALM gesture */
-      for (i = 0; i < (hands ? hands->total : 0); i++) {
+      for (i = 0; i < hands->total; i++) {
         r = (CvRect *) cvGetSeqElem (hands, i);
         distance = (int) sqrt (pow ((r->x - filter->prev_r->x),
                 2) + pow ((r->y - filter->prev_r->y), 2));