Catch exceptions when large allocations fail
This commit is contained in:
parent
652606f780
commit
64b5784c0b
@ -379,7 +379,7 @@ static PyObject* pyopencv_from(const Mat& m)
|
|||||||
if(!p->refcount || p->allocator != &g_numpyAllocator)
|
if(!p->refcount || p->allocator != &g_numpyAllocator)
|
||||||
{
|
{
|
||||||
temp.allocator = &g_numpyAllocator;
|
temp.allocator = &g_numpyAllocator;
|
||||||
m.copyTo(temp);
|
ERRWRAP2(m.copyTo(temp));
|
||||||
p = &temp;
|
p = &temp;
|
||||||
}
|
}
|
||||||
p->addref();
|
p->addref();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user