ref: 7890686d8082b914f86f12de5cf8c61248b17eff
parent: 3e2f953a10cafa1b037d0172f81103c9f1a5f433
author: David Turner <[email protected]>
date: Tue May 22 10:08:09 EDT 2007
fix crash when not using the bytecode interpreter with TrueType fonts
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-05-22 David Turner <[email protected]>
+ * 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 :-(
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1382,9 +1382,12 @@
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 );
/* read each subglyph independently */
@@ -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 */