diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-11-20 09:32:54 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-11-20 09:32:54 +0000 |
commit | 9b3d96fddd214b808f241197c42af0434c6bba82 (patch) | |
tree | e11647a9b4480f2b446a448f42dc105ba51c7c09 /vcl | |
parent | 3d55b14aa23ac49c499ee654f793e722f517d858 (diff) |
fdo#57059 - fix crasher rendering borders for very small windows.
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 0031fa03099f..fab9d90acae1 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2175,6 +2175,10 @@ bool Bitmap::ImplScaleConvolution( const double& rScaleX, const double& rScaleY, int* pPixels; int* pCount; + // Handle negative scales safely cf. other ImplScale methods + if( ( nNewWidth < 1L ) || ( nNewHeight < 1L ) ) + return false; + // Do horizontal filtering ImplCalculateContributions( nWidth, nNewWidth, aNumberOfContributions, pWeights, pPixels, pCount, aKernel ); pReadAcc = AcquireReadAccess(); |