Merge pull request #5942 from akarsakov:fix_memcpy_empty_vector

This commit is contained in:
Alexander Alekhin 2016-01-11 11:12:31 +00:00
commit 8a803865cf

View File

@ -197,7 +197,7 @@ namespace cv
}
resultsMutex.lock();
if ( (localInliers.size() > inliers.size()) || (localInliers.size() == inliers.size() && curIndex > bestIndex))
if ( (localInliers.size() > inliers.size()) || (localInliers.size() == inliers.size() && inliers.size() > 0 && curIndex > bestIndex))
{
inliers.clear();
inliers.resize(localInliers.size());