Fixed crash in BruteForceMatcher::clone

pull/13383/head
Andrey Kamaev 14 years ago
parent 43628ab868
commit 6935e95c2a
  1. 1
      modules/features2d/include/opencv2/features2d/features2d.hpp

@ -2367,6 +2367,7 @@ Ptr<DescriptorMatcher> BruteForceMatcher<Distance>::clone( bool emptyTrainData )
BruteForceMatcher* matcher = new BruteForceMatcher(distance);
if( !emptyTrainData )
{
matcher->trainDescCollection.resize(trainDescCollection.size());
std::transform( trainDescCollection.begin(), trainDescCollection.end(),
matcher->trainDescCollection.begin(), clone_op );
}

Loading…
Cancel
Save