mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 12:40:05 +08:00
Do not allow empty roi extraction from GpuMat
This commit is contained in:
parent
8e5dbc03fe
commit
f94eab1abd
@ -149,9 +149,9 @@ cv::cuda::GpuMat::GpuMat(const GpuMat& m, Rect roi) :
|
||||
{
|
||||
data += roi.x * elemSize();
|
||||
|
||||
CV_Assert( 0 <= roi.x && 0 <= roi.width &&
|
||||
CV_Assert( 0 <= roi.x && 0 < roi.width &&
|
||||
roi.x + roi.width <= m.cols &&
|
||||
0 <= roi.y && 0 <= roi.height &&
|
||||
0 <= roi.y && 0 < roi.height &&
|
||||
roi.y + roi.height <= m.rows );
|
||||
|
||||
if (refcount)
|
||||
|
Loading…
Reference in New Issue
Block a user