svx/source/dialog/svxruler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 90548039f09d4bc773bf6879a62d544adfa175db Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Apr 25 15:52:29 2024 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Apr 25 20:47:41 2024 +0200 svx: Avoid divide by 0 See https://crashreport.libreoffice.org/stats/signature/SvxRuler::UpdateTabs() Change-Id: Ie08c54d1a1b40bcc42da9f81c893f496fff433a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166626 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 6323583fd271..17c4edaa930d 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1033,7 +1033,7 @@ void SvxRuler::UpdateTabs() lCurrentDefTabDist = mxTabStopItem->GetDefaultDistance(); tools::Long nDefTabDist = ConvertHPosPixel(lCurrentDefTabDist); - const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent + const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent || nDefTabDist == 0 ? 0 : static_cast<sal_uInt16>( (lRightIndent - lPosPixel) / nDefTabDist );