diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-06 19:39:26 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-06 19:39:26 +0300 |
commit | 0e049e88e2169b831bb829bbff358b593ed228b8 (patch) | |
tree | ae56fe48573ef5d82ae9802eef10cbc900dee07e | |
parent | 14dbe1c2611bcb550702762004e0fc34161c68f1 (diff) |
One more crashing instance for hashes
-rw-r--r-- | source/blender/imbuf/intern/moviecache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index a068304e1ce..29bb35986e8 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -476,10 +476,14 @@ void IMB_moviecache_cleanup(MovieCache *cache, bool (cleanup_check_cb) (ImBuf *i check_unused_keys(cache); - GHASH_ITER(gh_iter, cache->hash) { + BLI_ghashIterator_init(&gh_iter, cache->hash); + + while (!BLI_ghashIterator_done(&gh_iter)) { MovieCacheKey *key = BLI_ghashIterator_getKey(&gh_iter); MovieCacheItem *item = BLI_ghashIterator_getValue(&gh_iter); + BLI_ghashIterator_step(&gh_iter); + if (cleanup_check_cb(item->ibuf, key->userkey, userdata)) { PRINT("%s: cache '%s' remove item %p\n", __func__, cache->name, item); |