summaryrefslogtreecommitdiff
path: root/pdf/pdf_function.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-01-08 01:35:10 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-01-09 14:30:10 +0100
commit828c7bc9bf140d04a85b27ba91d0825e236eab01 (patch)
treeae6334bdb39daddfd149b9a2b446d6f16fbcd087 /pdf/pdf_function.c
parent6bea2725986bf08e7d2400895f83e6ec62eef837 (diff)
downloadmupdf-828c7bc9bf140d04a85b27ba91d0825e236eab01.tar.xz
Fix bug where pdf function was used after being dropped.
Diffstat (limited to 'pdf/pdf_function.c')
-rw-r--r--pdf/pdf_function.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pdf/pdf_function.c b/pdf/pdf_function.c
index 942023e7..5cc4524e 100644
--- a/pdf/pdf_function.c
+++ b/pdf/pdf_function.c
@@ -1422,12 +1422,13 @@ pdf_load_function(pdf_xref *xref, fz_obj *dict)
}
fz_catch(ctx)
{
+ int type = func->type;
pdf_drop_function(ctx, func);
fz_throw(ctx, "cannot load %s function (%d %d R)",
- (func->type == SAMPLE ? "sampled" :
- (func->type == EXPONENTIAL ? "exponential" :
- (func->type == STITCHING ? "stitching" :
- (func->type == POSTSCRIPT ? "calculator" :
+ (type == SAMPLE ? "sampled" :
+ (type == EXPONENTIAL ? "exponential" :
+ (type == STITCHING ? "stitching" :
+ (type == POSTSCRIPT ? "calculator" :
"unknown")))), fz_to_num(dict), fz_to_gen(dict));
}