Commit dcc2512f authored by Naer Chang's avatar Naer Chang

issue 3710

added a check to prevent illegal access to operator[] when vector is empty
parent 930808c2
...@@ -1268,7 +1268,7 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std:: ...@@ -1268,7 +1268,7 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std::
scales.push_back((float)factor); scales.push_back((float)factor);
} }
if( !featureEvaluator->setImage(gray, scales) ) if ( scales.size() == 0 || !featureEvaluator->setImage(gray, scales) )
return; return;
// OpenCL code // OpenCL code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment