desktop/source/lib/init.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit e2d5f1ba3fd0db00276cf48b0d9be9b16dcbf7a0 Author: Henry Castro <hcas...@collabora.com> Date: Sun Nov 27 19:40:57 2016 -0400
lok: avoid render font with empty rectangle Change-Id: I58e24e0de37144ae5d67857b243e6a7091f2b77a Reviewed-on: https://gerrit.libreoffice.org/31281 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0d403e3..2ecfddc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2581,6 +2581,9 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, aFont.SetFontSize(Size(0, 25)); aDevice->SetFont(aFont); aDevice->GetTextBoundRect(aRect, aText); + if (aRect.IsEmpty()) + break; + int nFontWidth = aRect.BottomRight().X() + 1; *pFontWidth = nFontWidth; int nFontHeight = aRect.BottomRight().Y() + 1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits