From 9368e0565b98af5295b846be31087ca2111d4fe6 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 8 May 2017 01:45:10 +0800 Subject: Bug 697864: Free temporary pixmaps only if created. Previously this caused memory checker errors due to a non-temporary pixmap being accidentally freed and then later reused as expected. --- source/fitz/draw-mesh.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/fitz/draw-mesh.c b/source/fitz/draw-mesh.c index cbce5dbf..a40cdd12 100644 --- a/source/fitz/draw-mesh.c +++ b/source/fitz/draw-mesh.c @@ -288,8 +288,11 @@ fz_paint_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_pixmap } fz_catch(ctx) { - fz_drop_pixmap(ctx, conv); - fz_drop_pixmap(ctx, temp); + if (shade->use_function) + { + fz_drop_pixmap(ctx, conv); + fz_drop_pixmap(ctx, temp); + } fz_rethrow(ctx); } } -- cgit v1.2.3