From a11c02497f60bac7b916b8245d3d14f5ecb22bf2 Mon Sep 17 00:00:00 2001 From: Nisarg Thakkar Date: Thu, 8 Jan 2015 13:48:48 +0530 Subject: [PATCH] Fixed Bug similar to Bug#3757. UMat all dims zero after release. --- modules/core/include/opencv2/core/mat.inl.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/mat.inl.hpp b/modules/core/include/opencv2/core/mat.inl.hpp index 73a39e7..cb39c15 100644 --- a/modules/core/include/opencv2/core/mat.inl.hpp +++ b/modules/core/include/opencv2/core/mat.inl.hpp @@ -3284,7 +3284,8 @@ inline void UMat::release() { if( u && CV_XADD(&(u->urefcount), -1) == 1 ) deallocate(); - size.p[0] = 0; + for(int i = 0; i < dims; i++) + size.p[i] = 0; u = 0; } -- 2.7.4