mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
make sure that the empty mat is copied to UMat properly - i.e. UMat becomes empty. Before the patch such copy operation crashed
This commit is contained in:
@@ -263,6 +263,11 @@ void Mat::copyTo( OutputArray _dst ) const
|
||||
|
||||
if( _dst.isUMat() )
|
||||
{
|
||||
if( empty() )
|
||||
{
|
||||
_dst.release();
|
||||
return;
|
||||
}
|
||||
_dst.create( dims, size.p, type() );
|
||||
UMat dst = _dst.getUMat();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user