summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-20 09:32:54 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-11-20 09:32:54 +0000
commit9b3d96fddd214b808f241197c42af0434c6bba82 (patch)
treee11647a9b4480f2b446a448f42dc105ba51c7c09 /vcl
parent3d55b14aa23ac49c499ee654f793e722f517d858 (diff)
fdo#57059 - fix crasher rendering borders for very small windows.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/bitmap3.cxx4
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();