diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-07 20:55:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-08 12:29:29 +0000 |
commit | 51e2d23521f99254f09fcc459e7b41600cb9f76d (patch) | |
tree | aa168fcf1f4e764e4806cd71937546348cb968f2 /include | |
parent | 1479190c8690f1f72b0bcd62e8a4c81ddbb6b206 (diff) |
coverity#1267681 Dereference before null check
Change-Id: I629b12d53ef3bbadeb43e9555a8499252c1a1800
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/bmpacc.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx index bc43dbf175a9..f2f139921b58 100644 --- a/include/vcl/bmpacc.hxx +++ b/include/vcl/bmpacc.hxx @@ -348,14 +348,14 @@ inline Scanline BitmapReadAccess::GetBuffer() const inline Scanline BitmapReadAccess::GetScanline( long nY ) const { - assert(mpBuffer && "Access is not valid!"); + assert(mpBuffer && mpScanBuf && "Access is not valid!"); assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!"); - return( mpBuffer ? mpScanBuf[ nY ] : NULL ); + return mpScanBuf[nY]; } inline BitmapColor BitmapReadAccess::GetPixel( long nY, long nX ) const { - assert(mpBuffer && "Access is not valid!"); + assert(mpBuffer && mpScanBuf && "Access is not valid!"); assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!"); assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!"); return mFncGetPixel( mpScanBuf[ nY ], nX, maColorMask ); |