Fix for Bug#3757: All dimension values are 0 after release is called
authorNisarg Thakkar <nisargtha@gmail.com>
Mon, 23 Jun 2014 14:45:23 +0000 (20:15 +0530)
committerNisarg Thakkar <nisargtha@gmail.com>
Mon, 23 Jun 2014 14:45:23 +0000 (20:15 +0530)
modules/core/include/opencv2/core/mat.hpp

index 45c2590..90e7de0 100644 (file)
@@ -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;
 }