summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2016-04-07 12:10:29 +0200
committerMichael Meeks <michael.meeks@collabora.com>2016-04-07 15:38:45 +0000
commit92e33ae10d63b5acd8643d33c032dbb022bd75be (patch)
treed1c58713952cd18088d50506f567877bf0ba7d9b
parente2ef26991681d6e24c32f08660382af4ca48475c (diff)
tdf#98710 - catch exception due to crash in dwrite
Change-Id: I448b166866710825d2b3c582796c392436fe072e Reviewed-on: https://gerrit.libreoffice.org/23892 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/win/gdi/winlayout.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 12df505ffb71..1ee9d0246235 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -4002,7 +4002,16 @@ bool D2DWriteTextOutRenderer::DrawGlyphs(const Point & origin, uint16_t * pGid,
bool D2DWriteTextOutRenderer::GetDWriteFaceFromHDC(HDC hDC, IDWriteFontFace ** ppFontFace, float * lfSize) const
{
- bool const succeeded = SUCCEEDED(mpGdiInterop->CreateFontFaceFromHdc(hDC, ppFontFace));
+ bool succeeded = false;
+ try
+ {
+ succeeded = SUCCEEDED(mpGdiInterop->CreateFontFaceFromHdc(hDC, ppFontFace));
+ }
+ catch (const std::exception& e)
+ {
+ SAL_WARN("vcl.gdi.opengl", "Error in dwrite while creating font face: " << e.what());
+ return false;
+ }
if (succeeded)
{