diff options
author | Henry Castro <hcastro@collabora.com> | 2016-11-27 19:40:57 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-17 21:34:19 +0100 |
commit | c0634a1c8b99c586055f1ac2f7debb9080b6e3b4 (patch) | |
tree | 33b9cc24db47b2bb8cef955842c537c9aca39e5e /desktop | |
parent | ff138b34fc5ca765742db5fb791d0534defe0ba8 (diff) |
lok: avoid render font with empty rectangle
Change-Id: I58e24e0de37144ae5d67857b243e6a7091f2b77a
Reviewed-on: https://gerrit.libreoffice.org/31281
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
(cherry picked from commit e2d5f1ba3fd0db00276cf48b0d9be9b16dcbf7a0)
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 7492d1378c05..1af96437fb0d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2701,6 +2701,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; |