From 4eb85189e547f6175ef0f626565ebf9ad51313de Mon Sep 17 00:00:00 2001 From: Dmitry Retinskiy Date: Wed, 14 Aug 2013 15:30:35 +0400 Subject: [PATCH] bug #3094: added CV_Assert to PyrDown_ to check if source matrix is not empty --- modules/imgproc/src/pyramids.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/imgproc/src/pyramids.cpp b/modules/imgproc/src/pyramids.cpp index e7d315cb5..01e510e7d 100644 --- a/modules/imgproc/src/pyramids.cpp +++ b/modules/imgproc/src/pyramids.cpp @@ -191,6 +191,7 @@ pyrDown_( const Mat& _src, Mat& _dst, int borderType ) typedef typename CastOp::type1 WT; typedef typename CastOp::rtype T; + CV_Assert( !_src.empty() ); Size ssize = _src.size(), dsize = _dst.size(); int cn = _src.channels(); int bufstep = (int)alignSize(dsize.width*cn, 16);