diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2008-04-22 18:32:29 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2008-04-22 18:32:36 -0400 |
commit | 36feb5eacf16467d06d5cd9f63d19f17f933f1ef (patch) | |
tree | cb9d08282dc92b8330c87677679459c8df4d2707 /src | |
parent | d8f2e400cfe6e32e82d1656d3483905343124b97 (diff) |
In case the 'func' is deleting the state move the iterator before
calling it.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c index f607528fdc..63464e0705 100644 --- a/src/gallium/auxiliary/cso_cache/cso_cache.c +++ b/src/gallium/auxiliary/cso_cache/cso_cache.c @@ -334,10 +334,10 @@ void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type, iter = cso_hash_first_node(hash); while (!cso_hash_iter_is_null(iter)) { void *state = cso_hash_iter_data(iter); + iter = cso_hash_iter_next(iter); if (state) { func(state, user_data); } - iter = cso_hash_iter_next(iter); } } |