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

core: fix .begin()/.end() of empty Mat

This commit is contained in:
Alexander Alekhin
2020-03-20 13:04:04 +00:00
parent 8ac333697d
commit 377dd04224
2 changed files with 19 additions and 0 deletions
+8
View File
@@ -2082,4 +2082,12 @@ TEST(Mat, regression_12943) // memory usage: ~4.5 Gb
cv::flip(src, dst, 0);
}
TEST(Mat, empty_iterator_16855)
{
cv::Mat m;
EXPECT_NO_THROW(m.begin<uchar>());
EXPECT_NO_THROW(m.end<uchar>());
EXPECT_TRUE(m.begin<uchar>() == m.end<uchar>());
}
}} // namespace