diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-18 11:41:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-19 09:42:23 +0200 |
commit | 21ac405d723448d4f725715d27b58015f4bb5764 (patch) | |
tree | 65e8ad6c7afcb5931fee782b767823afd24c1a5a /sd | |
parent | 37afe1443ef35987e289d2419b78b200e6007fd5 (diff) |
cid#1448229 Division or modulo by zero
Change-Id: I8d1d7415c82c7d48f8d4bdf7b86e397fce01c015
Reviewed-on: https://gerrit.libreoffice.org/75908
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index bcd4d1cf9711..d477bb2655c4 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1790,7 +1790,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( nRadius >= nLength ) nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius else - nRadius = ( 0x2a30 * nRadius ) / nLength; + { + if (nLength != 0) + nRadius = ( 0x2a30 * nRadius ) / nLength; + else + nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius + } aPropOpt.AddOpt( ESCHER_Prop_adjustValue, nRadius ); } else |