[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win
Marco Cecchetti
marco.cecchetti at collabora.com
Thu Mar 31 11:46:03 UTC 2016
vcl/win/source/gdi/salgdi3.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 4ab36bbd1816d6f297892a638e6826f28ca87150
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Wed Mar 30 19:41:57 2016 +0200
tdf#98812: follow-up
pFont->mpFontInstance can be NULL.
Reviewed-on: https://gerrit.libreoffice.org/23654
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 9fa87bb1a42c45446f78b4d8c8096d7ce90a8022)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
Change-Id: I934703bc40621dc412e444cc9a370c7031cbbb86
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index b1f865d..964f25f 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1548,7 +1548,12 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* pFont, int nFallbackLevel
{
GetWinFontEntry(nFallbackLevel)->m_pFontCache->Release(GetWinFontEntry(nFallbackLevel));
}
- pFont->mpFontEntry->m_pFontCache->Acquire(pFont->mpFontEntry);
+ // WinSalGraphics::GetEmbedFontData does not set mpFontInstance/mpFontEntry
+ // since it is interested in font file data only.
+ if (pFont->mpFontEntry)
+ {
+ pFont->mpFontEntry->m_pFontCache->Acquire(pFont->mpFontEntry);
+ }
mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<ImplWinFontEntry*>( pFont->mpFontEntry );
mpWinFontData[ nFallbackLevel ] = static_cast<const ImplWinFontData*>( pFont->mpFontData );
More information about the Libreoffice-commits
mailing list