diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-18 15:10:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-18 15:12:12 +0100 |
commit | 3e8ef0e1a40a14d1c2bdb5345ed59941c765356b (patch) | |
tree | e9f6ea63ba96221ba64edaf58c75fcb44b760374 | |
parent | 60a70ea286279f58de8a0ba5de389330994c7eb2 (diff) |
ofz#3419 Null-dereference READ
Change-Id: I32c5d5039034ac76262223e42a1f27d6f1b84cb5
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 6 |
1 files 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); |