svx/source/dialog/svxruler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 96ec4e649ac9eb0528281e08f9a13e20545dd9f6 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Apr 25 15:52:29 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue May 7 07:46:11 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> (cherry picked from commit 90548039f09d4bc773bf6879a62d544adfa175db) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167214 Reviewed-by: Aron Budea <aron.bu...@collabora.com> Tested-by: Michael Weghorn <m.wegh...@posteo.de> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index ffc34cd5bfb5..8c787b68706e 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1032,7 +1032,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 );