desktop/source/lib/init.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit 55dacde0428bc0444648e96e3791b9733a85a4b7 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 8b8391f..3e91af8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2587,6 +2587,9 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, aFont.SetSize(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