diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-05-09 19:47:19 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-05-09 19:47:19 +0100 |
commit | 4cd607a4960ce546d52f75aca8a9e39a9c1612ce (patch) | |
tree | 72d9f91aec92a7dbb256eab24d4c15fcf5709250 /source | |
parent | 6fc5eae8e9bf4658658163fdefca9950f6320c65 (diff) | |
download | mupdf-4cd607a4960ce546d52f75aca8a9e39a9c1612ce.tar.xz |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/store.c | 3 |
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) |