Commit 08c6ffaa authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #8346 from Sahloul:fixes/python_wrapper/flann

parents da0188ac db528415
...@@ -23,6 +23,9 @@ bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name) ...@@ -23,6 +23,9 @@ bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name)
PyObject* item = NULL; PyObject* item = NULL;
Py_ssize_t pos = 0; Py_ssize_t pos = 0;
if (!o || o == Py_None)
return true;
if(PyDict_Check(o)) { if(PyDict_Check(o)) {
while(PyDict_Next(o, &pos, &key, &item)) { while(PyDict_Next(o, &pos, &key, &item)) {
if( !PyString_Check(key) ) { if( !PyString_Check(key) ) {
......
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