1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Added more strict checks for empty inputs to compare, meanStdDev and RNG::fill

This commit is contained in:
Maksim Shabunin
2018-07-18 15:24:58 +03:00
parent fa466b022d
commit 1165fdd0f5
7 changed files with 35 additions and 107 deletions
+2 -1
View File
@@ -1233,7 +1233,8 @@ void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op)
CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ ||
op == CMP_NE || op == CMP_GE || op == CMP_GT );
if(_src1.empty() || _src2.empty())
CV_Assert(_src1.empty() == _src2.empty());
if (_src1.empty() && _src2.empty())
{
_dst.release();
return;