summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-06-07 01:51:01 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-06-08 23:12:59 +0800
commit1e6eb8dfff41be5567a5ea2e1730a7e00b5726f1 (patch)
treee36fa87e4822bf63899c8835f7959d6562224826 /source/fitz
parent37295cf3cdcc7f0546ee15d5364e5899249a25eb (diff)
downloadmupdf-1e6eb8dfff41be5567a5ea2e1730a7e00b5726f1.tar.xz
Avoid using fz_var() when not necessary.
Diffstat (limited to 'source/fitz')
-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;