From c554bd617e283f2fcb5f152603f17c049cba8829 Mon Sep 17 00:00:00 2001 From: sangho park Date: Wed, 2 Aug 2017 13:10:22 +0900 Subject: [PATCH] fix pvs warning (V595) Change-Id: If5eab65eec0dd87c84883efb4c83633baee70783 Signed-off-by: sangho park --- mv_face/face/src/FaceEyeCondition.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mv_face/face/src/FaceEyeCondition.cpp b/mv_face/face/src/FaceEyeCondition.cpp index ad4fab6..77ca38b 100644 --- a/mv_face/face/src/FaceEyeCondition.cpp +++ b/mv_face/face/src/FaceEyeCondition.cpp @@ -155,6 +155,11 @@ int FaceEyeCondition::recognizeEyeCondition( return MEDIA_VISION_ERROR_NO_DATA; } + if (NULL == eyeCondition) { + LOGE("Output eye condition is NULL. Eye condition recognition failed."); + return MEDIA_VISION_ERROR_INVALID_PARAMETER; + } + if (faceLocation.height <= 0 || faceLocation.width <= 0 || faceLocation.point.x < 0 || faceLocation.point.y < 0 || (faceLocation.point.x + faceLocation.width) > grayImage.cols || @@ -165,11 +170,6 @@ int FaceEyeCondition::recognizeEyeCondition( return MEDIA_VISION_ERROR_INVALID_PARAMETER; } - if (NULL == eyeCondition) { - LOGE("Output eye condition is NULL. Eye condition recognition failed."); - return MEDIA_VISION_ERROR_INVALID_PARAMETER; - } - /* split left and right eyes */ cv::Mat leftEye; cv::Mat rightEye; -- 2.7.4