From 4cd607a4960ce546d52f75aca8a9e39a9c1612ce Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 9 May 2017 19:47:19 +0100 Subject: Fix Memento 'history' of block actions. We call Memento_takeRef etc throughout the code so that each block keeps a history of the events on which it's reference count changes. I'd missed a case - fixed here. --- source/fitz/store.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/fitz/store.c b/source/fitz/store.c index dfde067f..86f51acf 100644 --- a/source/fitz/store.c +++ b/source/fitz/store.c @@ -472,7 +472,10 @@ fz_store_item(fz_context *ctx, void *key, void *val_, size_t itemsize, const fz_ /* Now bump the ref */ if (val->refs > 0) + { + (void)Memento_takeRef(val); val->refs++; + } /* If we haven't got an infinite store, check for space within it */ if (store->max != FZ_STORE_UNLIMITED) -- cgit v1.2.3