summaryrefslogtreecommitdiff
path: root/source/fitz/draw-glyph.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-10-11 22:39:08 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-10-14 01:19:07 +0800
commitc3f0d8a4612f25ac3b728d8335c13dc543254be2 (patch)
treefe54f8e73a4ba87401de8cd5a35446910b484c7f /source/fitz/draw-glyph.c
parent160369e81e6675d122b210b45844c0dc86ec8876 (diff)
downloadmupdf-c3f0d8a4612f25ac3b728d8335c13dc543254be2.tar.xz
Drop all contexts the same way.
* Handle multiple calls to fz_drop_colorspace_context() and fz_drop_font_context(). * Allow missing context in call to fz_drop_aa_context() and fz_drop_glyph_cache_context(). * Only drop font context objects when dropping the last reference. * Avoid unnecessary NULL checks.
Diffstat (limited to 'source/fitz/draw-glyph.c')
-rw-r--r--source/fitz/draw-glyph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/draw-glyph.c b/source/fitz/draw-glyph.c
index a0c47b74..1eb89093 100644
--- a/source/fitz/draw-glyph.c
+++ b/source/fitz/draw-glyph.c
@@ -107,7 +107,7 @@ fz_purge_glyph_cache(fz_context *ctx)
void
fz_drop_glyph_cache_context(fz_context *ctx)
{
- if (!ctx->glyph_cache)
+ if (!ctx || !ctx->glyph_cache)
return;
fz_lock(ctx, FZ_LOCK_GLYPHCACHE);