Fix T41114: Particle systems cause memory corruption due to invalid

dmcache index (again).
This commit is contained in:
Lukas Tönne 2014-07-18 11:53:35 +02:00
parent cf3bb40c62
commit b984489181

@ -399,7 +399,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
}
}
if (origindex_final != ORIGINDEX_NONE) {
if (origindex_final != ORIGINDEX_NONE && origindex_final < totelem) {
if (nodearray[origindex_final]) {
/* prepend */
node->next = nodearray[origindex_final];