Fix T62849: crash entering particle edit mode with hair dynamics

This commit is contained in:
Brecht Van Lommel
2019-04-16 01:41:37 +02:00
parent d0cb98790e
commit 5ac7675f4c

View File

@@ -4798,8 +4798,11 @@ void PE_create_particle_edit(
edit = (psys) ? psys->edit : cache->edit; edit = (psys) ? psys->edit : cache->edit;
if (!edit) { if (!edit) {
ParticleSystem *psys_eval = psys_eval_get(depsgraph, ob, psys); ParticleSystem *psys_eval = NULL;
psys_copy_particles(psys, psys_eval); if (psys) {
psys_eval = psys_eval_get(depsgraph, ob, psys);
psys_copy_particles(psys, psys_eval);
}
totpoint = psys ? psys->totpart : (int)((PTCacheMem *)cache->mem_cache.first)->totpoint; totpoint = psys ? psys->totpart : (int)((PTCacheMem *)cache->mem_cache.first)->totpoint;