mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 05:06:29 +08:00
Merge pull request #4111 from mshabunin:fix-flann-access
This commit is contained in:
commit
945aa06f58
@ -190,9 +190,13 @@ public:
|
||||
|
||||
void deallocate(UMatData* u) const
|
||||
{
|
||||
if(u)
|
||||
if(!u)
|
||||
return;
|
||||
PyEnsureGIL gil;
|
||||
CV_Assert(u->urefcount >= 0);
|
||||
CV_Assert(u->refcount >= 0);
|
||||
if(u->refcount == 0)
|
||||
{
|
||||
PyEnsureGIL gil;
|
||||
PyObject* o = (PyObject*)u->userdata;
|
||||
Py_XDECREF(o);
|
||||
delete u;
|
||||
|
Loading…
Reference in New Issue
Block a user