From 55cd20e6228a06836285c14ca6726adb1bb4ffcb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 11 Nov 2022 13:53:10 +0000 Subject: cid#1516789 Division or modulo by float zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I191d475df5d1937e80fe6844de618a9ce315aee8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142585 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svx/source/styles/CommonStylePreviewRenderer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx/source/styles') 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; -- cgit