summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/fitz/image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c
index d530b6e3..f2edf564 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -687,13 +687,13 @@ fz_get_pixmap_from_image(fz_context *ctx, fz_image *image, const fz_irect *subar
/* Now we try to cache the pixmap. Any failure here will just result
* in us not caching. */
- fz_var(keyp);
+ keyp = fz_malloc_struct(ctx, fz_image_key);
+ keyp->refs = 1;
+
fz_try(ctx)
{
fz_pixmap *existing_tile;
- keyp = fz_malloc_struct(ctx, fz_image_key);
- keyp->refs = 1;
keyp->image = fz_keep_image_store_key(ctx, image);
keyp->l2factor = l2factor;
keyp->rect = key.rect;