diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-05-08 01:45:10 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-05-08 21:03:26 +0800 |
commit | 9368e0565b98af5295b846be31087ca2111d4fe6 (patch) | |
tree | ff08ed07a16619af8f9adbbc8a85183f833efde3 | |
parent | 31de71cfe7e38e335da9503564ef499c405cc6f7 (diff) | |
download | mupdf-9368e0565b98af5295b846be31087ca2111d4fe6.tar.xz |
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.
-rw-r--r-- | source/fitz/draw-mesh.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); } } |