diff options
Diffstat (limited to 'pdf/base_object.c')
-rw-r--r-- | pdf/base_object.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pdf/base_object.c b/pdf/base_object.c index 97cb97cc..2a5e6d78 100644 --- a/pdf/base_object.c +++ b/pdf/base_object.c @@ -145,8 +145,8 @@ pdf_new_indirect(fz_context *ctx, int num, int gen, void *xref) pdf_obj * pdf_keep_obj(pdf_obj *obj) { - assert(obj); - obj->refs ++; + if (obj) + obj->refs ++; return obj; } @@ -159,7 +159,6 @@ int pdf_is_indirect(pdf_obj *obj) do { \ if (obj && obj->kind == PDF_INDIRECT) \ {\ - fz_assert_lock_not_held(obj->ctx, FZ_LOCK_FILE); \ obj = pdf_resolve_indirect(obj); \ } \ } while (0) |