diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-03-30 19:41:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-03-31 11:42:22 +0000 |
commit | 9fa87bb1a42c45446f78b4d8c8096d7ce90a8022 (patch) | |
tree | e11e298dabbf7ce73e58f5a86cbad0033bd0b977 /vcl | |
parent | 3d7ac24d2f2ffbd2f5919916534601c140aa82e8 (diff) |
tdf#98812: follow-up
pFont->mpFontInstance can be NULL.
Change-Id: I934703bc40621dc412e444cc9a370c7031cbbb86
Reviewed-on: https://gerrit.libreoffice.org/23654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 48a3c925ee19..6819d2155182 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1458,7 +1458,12 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* pFont, int nFallbackLevel { GetWinFontEntry(nFallbackLevel)->mpFontCache->Release(GetWinFontEntry(nFallbackLevel)); } - pFont->mpFontInstance->mpFontCache->Acquire(pFont->mpFontInstance); + // WinSalGraphics::GetEmbedFontData does not set mpFontInstance + // since it is interested in font file data only. + if (pFont->mpFontInstance) + { + pFont->mpFontInstance->mpFontCache->Acquire(pFont->mpFontInstance); + } mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<WinFontInstance*>( pFont->mpFontInstance ); mpWinFontData[ nFallbackLevel ] = static_cast<const WinFontFace*>( pFont->mpFontData ); |