From 64b5784c0b6db801725c2398d1c0a59d8eb82dfa Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Fri, 5 Apr 2013 00:43:10 -0400 Subject: [PATCH] Catch exceptions when large allocations fail --- modules/python/src2/cv2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 308eb4263..64c4ad9ff 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -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();