From ccb1e5fac0b035fc0e1a3dffce8212f8787967d8 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Thu, 21 Oct 2010 15:47:49 +0000 Subject: [PATCH] added assert to MatConstIterator::pos() --- modules/core/include/opencv2/core/mat.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp index 46bb41fdba..f9eef981a9 100644 --- a/modules/core/include/opencv2/core/mat.hpp +++ b/modules/core/include/opencv2/core/mat.hpp @@ -1804,11 +1804,11 @@ template inline MatIterator_<_Tp> MatIterator_<_Tp>::operator ++(i return b; } -// Fixing a back compatibility problem -- to be reviewed by Vadim template inline Point MatConstIterator_<_Tp>::pos() const { if( !m ) return Point(); + CV_DbgAssert( m->dims <= 2 ); if( m->isContinuous() ) { ptrdiff_t ofs = ptr - (_Tp*)m->data;