From bc310b35a8dcba3ef22dd80d15e032f7e94795ef Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 15 Mar 2016 17:41:12 +0000 Subject: Memento: Track fz_streams. --- source/fitz/stream-open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/fitz/stream-open.c b/source/fitz/stream-open.c index e9836dd1..1b3ce97d 100644 --- a/source/fitz/stream-open.c +++ b/source/fitz/stream-open.c @@ -46,7 +46,7 @@ fz_new_stream(fz_context *ctx, void *state, fz_stream_next_fn *next, fz_stream_c fz_stream * fz_keep_stream(fz_context *ctx, fz_stream *stm) { - if (stm) + if (Memento_takeRef(stm)) stm->refs ++; return stm; } @@ -54,7 +54,7 @@ fz_keep_stream(fz_context *ctx, fz_stream *stm) void fz_drop_stream(fz_context *ctx, fz_stream *stm) { - if (!stm) + if (!Memento_dropRef(stm)) return; stm->refs --; if (stm->refs == 0) -- cgit v1.2.3