Skip to content

Commit

Permalink
Merge pull request opencv#1086 from melody-rain:2.4_fix_oclMat_constr…
Browse files Browse the repository at this point in the history
…uctor
  • Loading branch information
Roman Donchenko authored and OpenCV Buildbot committed Jul 4, 2013
2 parents 6bf8f47 + 97e620b commit 4d56973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ocl/include/opencv2/ocl/matrix_operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ namespace cv
{
flags &= roi.width < m.cols ? ~Mat::CONTINUOUS_FLAG : -1;
offset += roi.y * step + roi.x * elemSize();
CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols &&
0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows );
CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.wholecols &&
0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.wholerows );
if( refcount )
CV_XADD(refcount, 1);
if( rows <= 0 || cols <= 0 )
Expand Down

0 comments on commit 4d56973

Please sign in to comment.