From d6146e95439bc7f33656405643dbbfba27f3bd22 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 13 Aug 2013 18:16:41 +0400 Subject: [PATCH] Boring changes - gpulegacy. --- modules/gpulegacy/src/cuda/NCVHaarObjectDetection.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gpulegacy/src/cuda/NCVHaarObjectDetection.cu b/modules/gpulegacy/src/cuda/NCVHaarObjectDetection.cu index c8aaaeaced..3ac1e9491d 100644 --- a/modules/gpulegacy/src/cuda/NCVHaarObjectDetection.cu +++ b/modules/gpulegacy/src/cuda/NCVHaarObjectDetection.cu @@ -2138,8 +2138,8 @@ static NCVStatus loadFromXML(const cv::String &filename, haarClassifierNodes.resize(0); haarFeatures.resize(0); - cv::Ptr oldCascade = (CvHaarClassifierCascade*)cvLoad(filename.c_str(), 0, 0, 0); - if (oldCascade.empty()) + cv::Ptr oldCascade((CvHaarClassifierCascade*)cvLoad(filename.c_str(), 0, 0, 0)); + if (!oldCascade) { return NCV_HAAR_XML_LOADING_EXCEPTION; }