From c3f0d8a4612f25ac3b728d8335c13dc543254be2 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 11 Oct 2016 22:39:08 +0800 Subject: 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. --- source/fitz/store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/fitz/store.c') diff --git a/source/fitz/store.c b/source/fitz/store.c index 2c8a7022..c85ceab2 100644 --- a/source/fitz/store.c +++ b/source/fitz/store.c @@ -661,7 +661,7 @@ fz_keep_store_context(fz_context *ctx) void fz_drop_store_context(fz_context *ctx) { - if (ctx == NULL || ctx->store == NULL) + if (!ctx) return; if (fz_drop_imp(ctx, ctx->store, &ctx->store->refs)) { -- cgit v1.2.3