From 98421e5970819c652a940fd28937c205ca27dba7 Mon Sep 17 00:00:00 2001 From: Nisarg Thakkar Date: Mon, 23 Jun 2014 20:15:23 +0530 Subject: [PATCH] Fix for Bug#3757: All dimension values are 0 after release is called --- modules/core/include/opencv2/core/mat.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 45c25900c3..90e7de099a 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -366,7 +366,8 @@ inline void Mat::release() if( refcount && CV_XADD(refcount, -1) == 1 ) deallocate(); data = datastart = dataend = datalimit = 0; - size.p[0] = 0; + for(int i = 0; i < dims; i++) + size.p[i] = 0; refcount = 0; }