sw/source/core/layout/atrfrm.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit ea4cd397300120a0f825752182eb3b943eb8a1b2 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 31 13:29:00 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Jun 1 13:53:35 2022 +0200 sw: avoid EXCEPTION_INT_DIVIDE_BY_ZERO See https://crashreport.libreoffice.org/stats/signature/SwFormatCol::Calc(unsigned%20short,unsigned%20short) Change-Id: I79321737b7bed3acff3418d0b51dc6225baaf57f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135184 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index cf8d93ac3acf..eaaafde29a26 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1066,7 +1066,7 @@ void SwFormatCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct ) { tools::Long nTmp = rCol.GetWishWidth(); nTmp *= GetWishWidth(); - nTmp /= nAct; + nTmp = nAct == 0 ? nTmp : nTmp / nAct; rCol.SetWishWidth(sal_uInt16(nTmp)); } }