Commit 6935e95c authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed crash in BruteForceMatcher::clone

parent 43628ab8
......@@ -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 );
}
......
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