diff options
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 93f6965e97b..2e08e0587ac 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2969,12 +2969,10 @@ void BKE_ptcache_free(PointCache *cache) } void BKE_ptcache_free_list(ListBase *ptcaches) { - PointCache *cache = ptcaches->first; + PointCache *cache; - while (cache) { - BLI_remlink(ptcaches, cache); + while ((cache = BLI_pophead(ptcaches))) { BKE_ptcache_free(cache); - cache = ptcaches->first; } } |