diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-11-28 19:44:02 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-11-28 19:44:02 +0000 |
commit | 3a207e707b352b8031409f3851705fbc7eccff36 (patch) | |
tree | 534de121baa1b2a662acecda38bc4a4e536fb2df /fitz/base_context.c | |
parent | bdf5c8848a2de071c8380fab86a1a49215ed5ee7 (diff) | |
download | mupdf-3a207e707b352b8031409f3851705fbc7eccff36.tar.xz |
Move Freetype globals into context.
Freetype globals are not shared between threads currently - to do that
we'll need to introduce a lock.
Diffstat (limited to 'fitz/base_context.c')
-rw-r--r-- | fitz/base_context.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fitz/base_context.c b/fitz/base_context.c index c64d09e7..2986a8f8 100644 --- a/fitz/base_context.c +++ b/fitz/base_context.c @@ -15,6 +15,7 @@ fz_free_context(fz_context *ctx) return; /* Other finalisation calls go here (in reverse order) */ + fz_free_font_context(ctx); if (ctx->error) { @@ -50,6 +51,14 @@ fz_new_context(fz_alloc_context *alloc) ctx->warn->count = 0; /* New initialisation calls for context entries go here */ + fz_try(ctx) + { + fz_new_font_context(ctx); + } + fz_catch(ctx) + { + goto cleanup; + } return ctx; |