summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-09 15:04:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-09 15:05:15 +0200
commiteacbead4f5a4dc7c8db3d60c948e28c199aa2b10 (patch)
tree25d17162a1addc50007a8a1f921209c22c3fc646
parent9085cb9aa97ce5a198e321a1c6303ac64bd735f0 (diff)
vcl: handle nDPI == 0 in ImplPixelToLogic()
To avoid the floating point exception that can be seen sometimes on the Jenkins_Linux tinderbox during CppunitTest_sw_uiwriter. Change-Id: I270bfbe9c8fbb4cb3a86f45b5f4c3afb32213b9e
-rw-r--r--vcl/source/outdev/map.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index a33ef24d4373..c330f19ee6bc 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -402,7 +402,7 @@ static long ImplPixelToLogic( long n, long nDPI, long nMapNum, long nMapDenom,
{
// To "use" it...
(void) nThres;
- if (nMapNum == 0)
+ if (nMapNum == 0 || nDPI == 0)
{
return 0;
}