Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 271160a54f0..df6534946fd 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -3045,12 +3045,9 @@ static PointCache *ptcache_copy(PointCache *cache, int copy_data)
ncache= MEM_dupallocN(cache);
- ncache->mem_cache.first = NULL;
- ncache->mem_cache.last = NULL;
+ BLI_listbase_clear(&ncache->mem_cache);
if (copy_data == FALSE) {
- ncache->mem_cache.first = NULL;
- ncache->mem_cache.last = NULL;
ncache->cached_frames = NULL;
/* flag is a mix of user settings and simulator/baking state */
@@ -3089,7 +3086,7 @@ PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old
{
PointCache *cache = ptcaches_old->first;
- ptcaches_new->first = ptcaches_new->last = NULL;
+ BLI_listbase_clear(ptcaches_new);
for (; cache; cache=cache->next)
BLI_addtail(ptcaches_new, ptcache_copy(cache, copy_data));