diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-16 02:41:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-16 02:42:16 +0300 |
commit | 5ac7675f4c9c06b9c3b5598dff4b9ce1a7a56cbe (patch) | |
tree | 3907d64b1ee2f23e52f4b170d887a60f4a161bda | |
parent | d0cb98790ededfb0fc98e4445feddef9cc85beee (diff) |
Fix T62849: crash entering particle edit mode with hair dynamics
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; |