Fix for [#25006] Particle system crash (missing check for negative index)

This commit is contained in:
Janne Karhu
2010-12-02 14:52:07 +00:00
parent 38eb5fe75c
commit 5ca7c1b0f8

View File

@@ -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);