fixes Mat::empty() and Mat::create() in the case of zero sizes (ticket #691)

This commit is contained in:
Vadim Pisarevsky
2010-11-20 13:16:16 +00:00
parent 5f15cf6430
commit 3a8df6034f
2 changed files with 2 additions and 2 deletions

View File

@@ -205,7 +205,7 @@ void Mat::create(int d, const int* _sizes, int _type)
flags = (_type & CV_MAT_TYPE_MASK) | MAGIC_VAL;
setSize(*this, d, _sizes, 0, allocator == 0);
if( size.p[0] > 0 )
if( total() > 0 )
{
if( !allocator )
{