From 5ac7675f4c9c06b9c3b5598dff4b9ce1a7a56cbe Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Apr 2019 01:41:37 +0200 Subject: Fix T62849: crash entering particle edit mode with hair dynamics --- source/blender/editors/physics/particle_edit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index bd78677bdb6..149dadedfb4 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4798,8 +4798,11 @@ void PE_create_particle_edit( edit = (psys) ? psys->edit : cache->edit; if (!edit) { - ParticleSystem *psys_eval = psys_eval_get(depsgraph, ob, psys); - psys_copy_particles(psys, psys_eval); + ParticleSystem *psys_eval = NULL; + 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; -- cgit v1.2.3