diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-01-20 15:27:34 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-02-17 16:31:34 +0100 |
commit | b9d11456411907e9add8d91b02d67842990c2952 (patch) | |
tree | ca29439a35e83948645481cf0d0dfca445bf8b03 /source/xps/xps-path.c | |
parent | 4fe9caafead64704a16c7093b72115893be3087f (diff) | |
download | mupdf-b9d11456411907e9add8d91b02d67842990c2952.tar.xz |
Reference count fz_path and fz_text.
Disallow modification of shared fz_path and fz_text objects.
They should follow a create once, consume often pattern, and as such should
be immutable once created.
Diffstat (limited to 'source/xps/xps-path.c')
-rw-r--r-- | source/xps/xps-path.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c index 49240ee4..ee412d64 100644 --- a/source/xps/xps-path.c +++ b/source/xps/xps-path.c @@ -775,7 +775,7 @@ xps_clip(xps_document *doc, const fz_matrix *ctm, xps_resource *dict, char *clip else path = fz_new_path(doc->ctx); fz_clip_path(doc->dev, path, NULL, fill_rule == 0, ctm); - fz_free_path(doc->ctx, path); + fz_drop_path(doc->ctx, path); } /* @@ -1049,8 +1049,8 @@ xps_parse_path(xps_document *doc, const fz_matrix *ctm, char *base_uri, xps_reso xps_end_opacity(doc, opacity_mask_uri, dict, opacity_att, opacity_mask_tag); if (stroke_path != path) - fz_free_path(doc->ctx, stroke_path); - fz_free_path(doc->ctx, path); + fz_drop_path(doc->ctx, stroke_path); + fz_drop_path(doc->ctx, path); path = NULL; fz_drop_stroke_state(doc->ctx, stroke); |