summaryrefslogtreecommitdiff
path: root/source/fitz/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/text.c')
-rw-r--r--source/fitz/text.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/fitz/text.c b/source/fitz/text.c
index 4d2b73d9..466c869a 100644
--- a/source/fitz/text.c
+++ b/source/fitz/text.c
@@ -20,16 +20,13 @@ fz_new_text(fz_context *ctx, fz_font *font, const fz_matrix *trm, int wmode)
fz_text *
fz_keep_text(fz_context *ctx, fz_text *text)
{
- ++text->refs;
- return text;
+ return fz_keep_imp(ctx, text, &text->refs);
}
void
fz_drop_text(fz_context *ctx, fz_text *text)
{
- if (text == NULL)
- return;
- if (--text->refs == 0)
+ if (fz_drop_imp(ctx, text, &text->refs))
{
fz_drop_font(ctx, text->font);
fz_free(ctx, text->items);