diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-01-08 01:35:10 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-01-09 14:30:10 +0100 |
commit | 828c7bc9bf140d04a85b27ba91d0825e236eab01 (patch) | |
tree | ae6334bdb39daddfd149b9a2b446d6f16fbcd087 /pdf/pdf_function.c | |
parent | 6bea2725986bf08e7d2400895f83e6ec62eef837 (diff) | |
download | mupdf-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.c | 9 |
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)); } |