summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/store.c3
1 files changed, 3 insertions, 0 deletions
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)