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:
-rw-r--r--source/blender/blenkernel/intern/particle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 907521c9677..3eb575105ea 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -885,6 +885,9 @@ static void get_pointcache_keys_for_time(Object *UNUSED(ob), PointCache *cache,
index2 = BKE_ptcache_mem_index_find(pm, index);
index1 = BKE_ptcache_mem_index_find(pm->prev, index);
+ if (index2 < 0) {
+ return;
+ }
BKE_ptcache_make_particle_key(key2, index2, pm->data, (float)pm->frame);
if (index1 < 0)
@@ -895,6 +898,9 @@ static void get_pointcache_keys_for_time(Object *UNUSED(ob), PointCache *cache,
else if (cache->mem_cache.first) {
pm = cache->mem_cache.first;
index2 = BKE_ptcache_mem_index_find(pm, index);
+ if (index2 < 0) {
+ return;
+ }
BKE_ptcache_make_particle_key(key2, index2, pm->data, (float)pm->frame);
copy_particle_key(key1, key2, 1);
}