diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-06 15:25:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-06 20:52:04 +0100 |
commit | 946ae499df08cc632928c5431ba914a1ae6458dd (patch) | |
tree | 994f79417b48d6a8eac487143ed11eac035d1381 /lotuswordpro | |
parent | cdaf72c31b3e021443bdc6b654621be5eff7dadd (diff) |
ofz#4999 Divide-by-zero
Change-Id: I80b4d8a4d2abdfb54fe60a880555ea1ff62af987
Reviewed-on: https://gerrit.libreoffice.org/47503
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpoleobject.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx index 177508b89082..d9ca5f7ed088 100644 --- a/lotuswordpro/source/filter/lwpoleobject.cxx +++ b/lotuswordpro/source/filter/lwpoleobject.cxx @@ -162,6 +162,8 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight) if (fWidth/fHeight >= fDisFrameWidth/fDisFrameHeight) { fSclGrafWidth = fDisFrameWidth; + if (fWidth == 0.0) + throw o3tl::divide_by_zero(); fSclGrafHeight = (fDisFrameWidth/fWidth) * fHeight; } else |