mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Added assert for create Mat with negative dims, added tets for this case
This commit is contained in:
@@ -230,6 +230,7 @@ namespace cv { namespace gapi { namespace own {
|
||||
*/
|
||||
void create(Size _size, int _type)
|
||||
{
|
||||
GAPI_Assert(_size.height >= 0 && _size.width >= 0);
|
||||
if (_size != Size{cols, rows} )
|
||||
{
|
||||
Mat tmp{_size.height, _size.width, _type, nullptr};
|
||||
|
||||
Reference in New Issue
Block a user