From 6a215542794b71acc2a76984f2ab485876825c34 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 22 Mar 2016 14:06:15 +0200 Subject: Some more sanity asserts can't hurt Change-Id: I9b2f70ea98968aa98498cb754c2ebe494b6ecda7 --- include/vcl/bmpacc.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/vcl') diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx index ebc00c75c4c4..662f416d022c 100644 --- a/include/vcl/bmpacc.hxx +++ b/include/vcl/bmpacc.hxx @@ -376,7 +376,9 @@ inline Scanline BitmapReadAccess::GetScanline(long nY) const inline BitmapColor BitmapReadAccess::GetPixel(long nY, long nX) const { assert(mpBuffer && mpScanBuf && "Access is not valid!"); + assert(nX >= 0 && "x-coordinate out of range!"); assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!"); + assert(nY >= 0 && "y-coordinate out of range!"); assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!"); return mFncGetPixel(mpScanBuf[nY], nX, maColorMask ); -- cgit