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.
This commit is contained in:
Antony Riakiotakis 2015-02-06 14:28:08 +01:00
parent 24edab07cc
commit f4f468fc48

@ -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) {