summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bitmap3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-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();