summaryrefslogtreecommitdiff
path: root/source/fitz/output-png.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-09-08 01:57:24 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-09-08 01:57:24 +0800
commit171c079a80b00971bff1aca9de7ee08083bb7ebf (patch)
treeb9c88a64abbe68d788f66ed158ebc9f22818c007 /source/fitz/output-png.c
parentfe82c2d5c3d6128de511093fc4b8eaf47096653c (diff)
downloadmupdf-171c079a80b00971bff1aca9de7ee08083bb7ebf.tar.xz
Remove unnecessary fz_try()/fz_catch().
Diffstat (limited to 'source/fitz/output-png.c')
-rw-r--r--source/fitz/output-png.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c
index afda42f3..f67b1de0 100644
--- a/source/fitz/output-png.c
+++ b/source/fitz/output-png.c
@@ -356,13 +356,7 @@ fz_buffer *
fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image, const fz_color_params *color_params)
{
fz_pixmap *pix = fz_get_pixmap_from_image(ctx, image, NULL, NULL, NULL, NULL);
- fz_buffer *buf = NULL;
-
- fz_try(ctx)
- buf = png_from_pixmap(ctx, pix, color_params, 1);
- fz_catch(ctx)
- fz_rethrow(ctx);
- return buf;
+ return png_from_pixmap(ctx, pix, color_params, 1);
}
fz_buffer *