Skip to content

Commit db52841

Browse files
committed
Accept default argument of FLANN index parameters
1 parent 232d6b8 commit db52841

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/flann/misc/python/pyopencv_flann.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name)
2323
PyObject* item = NULL;
2424
Py_ssize_t pos = 0;
2525

26+
if (!o || o == Py_None)
27+
return true;
28+
2629
if(PyDict_Check(o)) {
2730
while(PyDict_Next(o, &pos, &key, &item)) {
2831
if( !PyString_Check(key) ) {

0 commit comments

Comments
 (0)