diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-06 16:28:08 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-06 16:28:08 +0300 |
commit | f4f468fc4830c32fc6423ff968cf1af86e8dcd16 (patch) | |
tree | 49c9fbe5afdb811e7b053bb8169a79c0a20de40d /source/blender/imbuf/intern | |
parent | 24edab07ccd4bb3f89e83b295b71297dca0432ce (diff) |
Fix sequencer crashing after recent GHash refactor.
Code frees hash element while iterating - I don't think that's a good
idea but this should keep things working for now at least.
Diffstat (limited to 'source/blender/imbuf/intern')
-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 07080452c24..a068304e1ce 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -144,11 +144,15 @@ static void check_unused_keys(MovieCache *cache) { GHashIterator gh_iter; - 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); bool remove; + BLI_ghashIterator_step(&gh_iter); + remove = !item->ibuf; if (remove) { |