You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2018/11/11 13:32:28 UTC

svn commit: r1846349 - /openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx

Author: mseidel
Date: Sun Nov 11 13:32:28 2018
New Revision: 1846349

URL: http://svn.apache.org/viewvc?rev=1846349&view=rev
Log:
i127929 - Fix for crash in Freetype code

Patch by: Arrigo Marchiori

Thank you for your contribution!

Modified:
    openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx

Modified: openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx?rev=1846349&r1=1846348&r2=1846349&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx (original)
+++ openoffice/trunk/main/vcl/source/glyphs/gcach_ftyp.cxx Sun Nov 11 13:32:28 2018
@@ -1361,6 +1361,15 @@ void FreetypeServerFont::InitGlyphData(
 
     FT_Glyph pGlyphFT;
     rc = FT_Get_Glyph( maFaceFT->glyph, &pGlyphFT );
+    if( rc != FT_Err_Ok )
+    {
+        // we get here e.g. when a PS font lacks the default glyph
+        rGD.SetCharWidth( 0 );
+        rGD.SetDelta( 0, 0 );
+        rGD.SetOffset( 0, 0 );
+        rGD.SetSize( Size( 0, 0 ) );
+        return;
+    }
 
     ApplyGlyphTransform( nGlyphFlags, pGlyphFT, false );
     if( mbArtBold && pFTEmbolden && (nFTVERSION < 2200) ) // #i71094# workaround staircase bug