提交 3590c3c4 编写于 作者: A Alexander Alekhin

Merge pull request #6882 from ilya-lavrenov:flann

......@@ -318,7 +318,19 @@ buildIndex_(void*& index, const Mat& data, const IndexParams& params, const Dist
::cvflann::Matrix<ElementType> dataset((ElementType*)data.data, data.rows, data.cols);
IndexType* _index = new IndexType(dataset, get_params(params), dist);
_index->buildIndex();
try
{
_index->buildIndex();
}
catch (...)
{
delete _index;
_index = NULL;
throw;
}
index = _index;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册