summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-graft.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf/pdf-graft.c')
-rw-r--r--source/pdf/pdf-graft.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/pdf/pdf-graft.c b/source/pdf/pdf-graft.c
index d7cb8b42..64072eb0 100644
--- a/source/pdf/pdf-graft.c
+++ b/source/pdf/pdf-graft.c
@@ -33,15 +33,13 @@ pdf_new_graft_map(fz_context *ctx, pdf_document *src)
pdf_graft_map *
fz_keep_graft_map(fz_context *ctx, pdf_graft_map *map)
{
- if (map)
- ++map->refs;
- return map;
+ return fz_keep_imp(ctx, map, &map->refs);
}
void
pdf_drop_graft_map(fz_context *ctx, pdf_graft_map *map)
{
- if (map && --map->refs == 0)
+ if (fz_drop_imp(ctx, map, &map->refs))
{
fz_drop_document(ctx, (fz_document*)map->src);
fz_free(ctx, map->dst_from_src);