diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-06-29 12:24:00 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-07-04 11:01:00 +0100 |
commit | b9076389f1ede0479d7e48676c60f4c0cc0d6c9a (patch) | |
tree | 6d32e662dcfc681d2bd9b091b99ee317d417e96f /source/xps | |
parent | c87bc4ed995b8dcf50277169fbd00cf6e0a640c8 (diff) | |
download | mupdf-b9076389f1ede0479d7e48676c60f4c0cc0d6c9a.tar.xz |
Remove is_static from fz_new{,_icc}_colorspace.
No longer required, and causes leaks.
Also, fix some reference counting problems with colorspaces.
Diffstat (limited to 'source/xps')
-rw-r--r-- | source/xps/xps-gradient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/xps/xps-gradient.c b/source/xps/xps-gradient.c index 349132d5..7916d088 100644 --- a/source/xps/xps-gradient.c +++ b/source/xps/xps-gradient.c @@ -222,7 +222,7 @@ xps_draw_one_radial_gradient(fz_context *ctx, xps_document *doc, const fz_matrix /* TODO: this (and the stuff in pdf_shade) should move to res_shade.c */ shade = fz_malloc_struct(ctx, fz_shade); FZ_INIT_STORABLE(shade, 1, fz_drop_shade_imp); - shade->colorspace = fz_device_rgb(ctx); + shade->colorspace = fz_keep_colorspace(ctx, fz_device_rgb(ctx)); shade->bbox = fz_infinite_rect; shade->matrix = fz_identity; shade->use_background = 0; @@ -261,7 +261,7 @@ xps_draw_one_linear_gradient(fz_context *ctx, xps_document *doc, const fz_matrix /* TODO: this (and the stuff in pdf_shade) should move to res_shade.c */ shade = fz_malloc_struct(ctx, fz_shade); FZ_INIT_STORABLE(shade, 1, fz_drop_shade_imp); - shade->colorspace = fz_device_rgb(ctx); + shade->colorspace = fz_keep_colorspace(ctx, fz_device_rgb(ctx)); shade->bbox = fz_infinite_rect; shade->matrix = fz_identity; shade->use_background = 0; |