From 56531c61617f4e0c7b4e67ac9dd5348b63f82194 Mon Sep 17 00:00:00 2001 From: Anton Obukhov Date: Fri, 4 Nov 2011 12:41:54 +0000 Subject: [PATCH] [*] Fixed #1461 --- modules/gpu/src/nvidia/core/NCV.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/gpu/src/nvidia/core/NCV.hpp b/modules/gpu/src/nvidia/core/NCV.hpp index 530aa0b..935ebcf 100644 --- a/modules/gpu/src/nvidia/core/NCV.hpp +++ b/modules/gpu/src/nvidia/core/NCV.hpp @@ -794,9 +794,10 @@ public: T &at(Ncv32u x, Ncv32u y) const { - if (x >= this->_width || y >= this->_height) + NcvBool bOutRange = (x >= this->_width || y >= this->_height); + ncvAssertPrintCheck(!bOutRange, "Error addressing matrix at [" << x << ", " << y << "]"); + if (bOutRange) { - printf("Error addressing matrix at [%d, %d]\n", x, y); return *this->_ptr; } return ((T *)((Ncv8u *)this->_ptr + y * this->_pitch))[x]; -- 2.7.4