From 6933d36755f90e23308a52c0c3b9c6a4423a9e4c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 28 Dec 2016 13:40:21 +0100 Subject: Make fz_parse_xml take a fz_buffer. Make xps_part contain a fz_buffer. --- source/xps/xps-image.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/xps/xps-image.c') diff --git a/source/xps/xps-image.c b/source/xps/xps-image.c index 83f7ac0d..aa495566 100644 --- a/source/xps/xps-image.c +++ b/source/xps/xps-image.c @@ -4,10 +4,7 @@ static fz_image * xps_load_image(fz_context *ctx, xps_document *doc, xps_part *part) { - /* Ownership of data always passes in here */ - unsigned char *data = part->data; - part->data = NULL; - return fz_new_image_from_data(ctx, data, part->size); + return fz_new_image_from_buffer(ctx, part->data); } /* FIXME: area unused! */ -- cgit v1.2.3