summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-17 13:44:11 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-17 13:44:38 +0200
commitecbc1865ce0894885eaa510a2b4909832d5805fd (patch)
tree0b82786244603904c9c2dd262a1963e8ec4a9348 /vcl/source/gdi
parent1dd736540fe4582ac0d725c2dfd233b196245a5c (diff)
coverity#1209374 avoid division by 0
Change-Id: I6728c0f79e0091b88b3269f5b8b25d27c82d9761
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/pngwrite.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 028ab024e571..c1a73cf7df6e 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -342,7 +342,7 @@ void PNGWriterImpl::ImplWritepHYs( const BitmapEx& rBmpEx )
if ( rBmpEx.GetPrefMapMode() == MAP_100TH_MM )
{
Size aPrefSize( rBmpEx.GetPrefSize() );
- if ( aPrefSize.Width() && aPrefSize.Height() )
+ if ( aPrefSize.Width() && aPrefSize.Height() && mnWidth && mnHeight )
{
ImplOpenChunk( PNGCHUNK_pHYs );
sal_uInt8 nMapUnit = 1;