vcl/source/treelist/svimpbox.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 9ad42e4fc7d711b4308bcc20b178741536874a43 Author: Xisco Fauli <[email protected]> AuthorDate: Thu Dec 11 16:02:43 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Dec 11 22:40:07 2025 +0100 crashreporting: avoid divide by zero Seen in https://crashreport.libreoffice.org/stats/signature/SvImpLBox::Paint(OutputDevice%20&,tools::Rectangle%20const%20&) Change-Id: Ia909a404181d1c13b8b67a62da2b684024fdfbbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195473 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 730d3ded3f01..b1676725a67c 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -873,6 +873,10 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle tools::Long nRectHeight = rRect.GetHeight(); tools::Long nEntryHeight = m_pView->GetEntryHeight(); + assert(nEntryHeight); + if (!nEntryHeight) + return; + // calculate area for the entries we want to draw sal_uInt16 nStartLine = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight); sal_uInt16 nCount = static_cast<sal_uInt16>(nRectHeight / nEntryHeight);
