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
path: root/source
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2010-12-02 17:52:07 +0300
committerJanne Karhu <jhkarh@gmail.com>2010-12-02 17:52:07 +0300
commit5ca7c1b0f88ec3f48a83dc641f864d6ee4979ae2 (patch)
tree192cc0f22670e04457301010b586f38ec13cd1cc /source
parent38eb5fe75ce0ce98c7e8fde61acf2b9fad826cd7 (diff)
Fix for [#25006] Particle system crash (missing check for negative index)
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 63f2d692c6d..f4af518d137 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -340,6 +340,11 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
/* cache the verts/faces! */
LOOP_PARTICLES {
+ if(pa->num < 0) {
+ pa->num_dmcache = -1;
+ continue;
+ }
+
if(psys->part->from == PART_FROM_VERT) {
if(nodearray[pa->num])
pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link);