1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Fix empty ND-array construction

This commit is contained in:
Vincent Rabaud
2025-05-26 10:54:28 +02:00
parent e92cfb35f6
commit 4033043488
2 changed files with 21 additions and 2 deletions
+2 -2
View File
@@ -315,7 +315,7 @@ void finalizeHdr(Mat& m)
m.rows = m.cols = -1;
if(m.u)
m.datastart = m.data = m.u->data;
if( m.data )
if( m.data && d > 0 )
{
m.datalimit = m.datastart + m.size[0]*m.step[0];
if( m.size[0] > 0 )
@@ -328,7 +328,7 @@ void finalizeHdr(Mat& m)
m.dataend = m.datalimit;
}
else
m.dataend = m.datalimit = 0;
m.dataend = m.datalimit = m.data;
}
//======================================= Mat ======================================================