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
Notes: blender-bot 2023-02-14 10:20:02 +01:00
Referenced by issue #49549, Crash when importing python modules on MacOS
Referenced by issue #41114, Specific file crashes with current trunk
1 changed files with 1 additions and 1 deletions

View File

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