summaryrefslogtreecommitdiff
path: root/svx/source/styles
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-11 13:53:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-12 23:49:22 +0100
commit55cd20e6228a06836285c14ca6726adb1bb4ffcb (patch)
treeab864c85d790084e8d2ac613a9e575161fb0c406 /svx/source/styles
parenta73c593e8e31080db7be5103b29bfe468652dc73 (diff)
cid#1516789 Division or modulo by float zero
Change-Id: I191d475df5d1937e80fe6844de618a9ce315aee8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142585 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/styles')
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 277948d3b6bc..5f12d209f0bf 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -295,7 +295,7 @@ void CommonStylePreviewRenderer::CalcRenderSize()
while(true);
double fRatio = 1;
- if (mnHeight > mnMaxHeight)
+ if (mnHeight > mnMaxHeight && mnHeight != 0)
fRatio = double(mnMaxHeight) / mnHeight;
mnHeight *= fRatio;