summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohnson Y. Yan <yinsen_yan@foxitsoftware.com>2010-11-26 11:58:08 +0100
committerWerner Lemberg <wl@gnu.org>2010-11-26 11:58:08 +0100
commit9073e7ceb628ed8404896bd1901e4262d77a170f (patch)
tree72d6cd24b2adc93120ace73e8974a7ebee813a2e /src
parented7d1a59ff7f1ef2c8c69cd7fd0aa68ec07c2db8 (diff)
[truetype] Better multi-threading support.
* src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone references.
Diffstat (limited to 'src')
-rw-r--r--src/truetype/ttinterp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 34cd2587..f55b8eea 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -595,6 +595,12 @@
exec->storage = size->storage;
exec->twilight = size->twilight;
+
+ /* In case of multi-threading it can happen that the old size object */
+ /* no longer exists, thus we must clear all glyph zone references. */
+ ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );
+ exec->zp1 = exec->zp0;
+ exec->zp2 = exec->zp0;
}
/* XXX: We reserve a little more elements on the stack to deal safely */