diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-29 10:08:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-29 11:10:30 +0100 |
commit | b62ff0cd434f0044b4becb8c5fdf72fe7e70aea6 (patch) | |
tree | 94cd754bc012fa42ce8fc5d4d7ab9b4066765f7e /vcl | |
parent | 966f51376b593fea9417d6f6800e574f0672dd11 (diff) |
coverity#1325062 Resource leak
Change-Id: I111b7d2f9fc0a15c07b2393acefde26e54065dc1
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 643f46bb4cfe..7bca9881b5f3 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2610,9 +2610,11 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess* pReadAcc, int aNumberOfContributions, double* pWeights, int* pPixels, int* pCount) { - BitmapWriteAccess* pWriteAcc = aNewBitmap.AcquireWriteAccess(); + if (!pReadAcc) + return false; - if (!pReadAcc || !pWriteAcc) + BitmapWriteAccess* pWriteAcc = aNewBitmap.AcquireWriteAccess(); + if (!pWriteAcc) return false; const int nHeight = GetSizePixel().Height(); |