fix crash when not using the bytecode interpreter with TrueType fonts
This commit is contained in:
parent
3e2f953a10
commit
7890686d80
|
@ -1,5 +1,8 @@
|
|||
2007-05-22 David Turner <david@freetype.org>
|
||||
|
||||
* src/truetype/ttgload.c: fix Werner's recent graphics state
|
||||
patch to avoid crashes when we don't use the bytecode interpreter !
|
||||
|
||||
* src/lzw/ftzopen.h, src/lzw/ftzopen.c: fix for bug #19910
|
||||
(heap blowup with very large .Z font file). The .Z format is
|
||||
*really* crappy :-(
|
||||
|
|
|
@ -1382,7 +1382,10 @@
|
|||
|
||||
FT_Stream old_stream = loader->stream;
|
||||
|
||||
TT_GraphicsState saved_GS = loader->exec->GS;
|
||||
TT_GraphicsState saved_GS;
|
||||
|
||||
if (loader->exec)
|
||||
saved_GS = loader->exec->GS;
|
||||
|
||||
|
||||
FT_GlyphLoader_Add( gloader );
|
||||
|
@ -1394,7 +1397,8 @@
|
|||
|
||||
|
||||
/* reinitialize graphics state */
|
||||
loader->exec->GS = saved_GS;
|
||||
if (loader->exec)
|
||||
loader->exec->GS = saved_GS;
|
||||
|
||||
/* Each time we call load_truetype_glyph in this loop, the */
|
||||
/* value of `gloader.base.subglyphs' can change due to table */
|
||||
|
|
Loading…
Reference in New Issue