From 3e8ef0e1a40a14d1c2bdb5345ed59941c765356b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 18 Sep 2017 15:10:49 +0100 Subject: ofz#3419 Null-dereference READ Change-Id: I32c5d5039034ac76262223e42a1f27d6f1b84cb5 --- vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 36ddf3df64cd..9b251804dfd2 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -621,14 +621,16 @@ void FreetypeFont::InitGlyphData(const GlyphItem& rGlyph, GlyphData& rGD ) const FT_Error rc = FT_Load_Glyph(maFaceFT, rGlyph.maGlyphId, mnLoadFlags); - if( rc != FT_Err_Ok ) + if (rc != FT_Err_Ok) return; if (mbArtBold) FT_GlyphSlot_Embolden(maFaceFT->glyph); FT_Glyph pGlyphFT; - FT_Get_Glyph( maFaceFT->glyph, &pGlyphFT ); + rc = FT_Get_Glyph(maFaceFT->glyph, &pGlyphFT); + if (rc != FT_Err_Ok) + return; ApplyGlyphTransform(rGlyph.IsVertical(), pGlyphFT); -- cgit