vcl/source/outdev/font.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 3fffbb74d2bbd4928bd7edcfbdbb5fa650867a3d
Author: Ashod Nakashian <[email protected]>
Date: Mon Feb 2 14:01:30 2015 -0500
Initialize graphics in OutputDevice::getFallbackFont.
OutputDevice::getFallbackFont requires mpGraphics to be created/initialized.
Without the check and initialization OutputDevice::getFallbackFont will
segfault.
Change-Id: I18225a24a6767933c8f1ff8f1cfd392543a95132
Reviewed-on: https://gerrit.libreoffice.org/14287
Reviewed-by: Caolán McNamara <[email protected]>
Tested-by: Caolán McNamara <[email protected]>
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 62dcfc5..c891483 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -2027,6 +2027,11 @@ SalLayout* OutputDevice::getFallbackFont(ImplFontEntry
&rFallbackFont,
FontSelectPattern &rFontSelData, int nFallbackLevel,
ImplLayoutArgs& rLayoutArgs) const
{
+ // we need a graphics
+ if (!mpGraphics && !AcquireGraphics())
+ return nullptr;
+
+ assert(mpGraphics != nullptr);
rFallbackFont.mnSetFontFlags = mpGraphics->SetFont( &rFontSelData,
nFallbackLevel );
rLayoutArgs.ResetPos();
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits