From a0cbb73ccb175d5f89ff72f205187ac93623f6af Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 6 Aug 2012 11:48:09 +0200 Subject: Fix locking bug in path stroking Thanks to Zeniko for pointing out this fix. --- fitz/res_path.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fitz/res_path.c b/fitz/res_path.c index d02ea560..a030cc29 100644 --- a/fitz/res_path.c +++ b/fitz/res_path.c @@ -415,11 +415,10 @@ fz_print_path(fz_context *ctx, FILE *out, fz_path *path, int indent) fz_stroke_state * fz_keep_stroke_state(fz_context *ctx, fz_stroke_state *stroke) { - fz_lock(ctx, FZ_LOCK_ALLOC); - if (!stroke) return NULL; + fz_lock(ctx, FZ_LOCK_ALLOC); if (stroke->refs > 0) stroke->refs++; fz_unlock(ctx, FZ_LOCK_ALLOC); -- cgit v1.2.3