From cdea04525935533536f525c89770c807072be508 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Tue, 25 Sep 2018 14:21:30 +0200 Subject: Set separation reference count early. This makes it easier to test failure inside the succeeding fz_try(). --- source/fitz/separation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/fitz/separation.c') 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); -- cgit v1.2.3