diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-09-25 14:21:30 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-10-12 15:50:49 +0800 |
commit | cdea04525935533536f525c89770c807072be508 (patch) | |
tree | aa025e347481bdbc48ea20a8698ae53de2ebecb1 /source | |
parent | a9c1167e3b9696b87977341c2df88607bae79913 (diff) | |
download | mupdf-cdea04525935533536f525c89770c807072be508.tar.xz |
Set separation reference count early.
This makes it easier to test failure inside
the succeeding fz_try().
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/separation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/separation.c b/source/fitz/separation.c index 97822f80..8b86a128 100644 --- a/source/fitz/separation.c +++ b/source/fitz/separation.c @@ -198,11 +198,11 @@ fz_separations *fz_clone_separations_for_overprint(fz_context *ctx, fz_separatio /* We need to clone us a separation structure, with all * the composite separations marked as enabled. */ clone = fz_malloc_struct(ctx, fz_separations); + clone->refs = 1; + clone->controllable = 0; fz_try(ctx) { - clone->refs = 1; - clone->controllable = 0; for (i = 0; i < n; i++) { fz_separation_behavior beh = sep_state(sep, i); |