diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-08-06 11:48:09 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2012-08-06 14:06:41 +0200 |
commit | a0cbb73ccb175d5f89ff72f205187ac93623f6af (patch) | |
tree | 30fb3aadc8033150d79fb409ddc16fd2f36bce2d | |
parent | 457a5ca61fc04107ce207ab2f40aa73725eb9947 (diff) | |
download | mupdf-a0cbb73ccb175d5f89ff72f205187ac93623f6af.tar.xz |
Fix locking bug in path stroking
Thanks to Zeniko for pointing out this fix.
-rw-r--r-- | fitz/res_path.c | 3 |
1 files changed, 1 insertions, 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); |