Catch exceptions when large allocations fail
authorDustin Spicuzza <dustin@virtualroadside.com>
Fri, 5 Apr 2013 04:43:10 +0000 (00:43 -0400)
committerDustin Spicuzza <dustin@virtualroadside.com>
Fri, 5 Apr 2013 04:43:10 +0000 (00:43 -0400)
modules/python/src2/cv2.cpp

index 308eb42..64c4ad9 100644 (file)
@@ -379,7 +379,7 @@ static PyObject* pyopencv_from(const Mat& m)
     if(!p->refcount || p->allocator != &g_numpyAllocator)
     {
         temp.allocator = &g_numpyAllocator;
-        m.copyTo(temp);
+        ERRWRAP2(m.copyTo(temp));
         p = &temp;
     }
     p->addref();