diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-07-15 16:27:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-07-15 16:54:27 +0300 |
commit | 914427afd5129954781cf4459067efeb6afa7d14 (patch) | |
tree | 4c538523b3629c1896760c45dddb31b2b5fd9f12 /source/blender/editors/physics | |
parent | 9db772fe9afea62657ccdfaeda0bff8700c490ef (diff) |
Fix T66686: Crash on Particle Edit, then Render
Reviewers: brecht, zeddb
Reviewed By: brecht
Maniphest Tasks: T66686
Differential Revision: https://developer.blender.org/D5259
Diffstat (limited to 'source/blender/editors/physics')
-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 4a55cb6c5c6..4e6022cf18c 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -337,10 +337,13 @@ static PTCacheEdit *pe_get_current(Depsgraph *depsgraph, Scene *scene, Object *o } } - if (edit) { + /* Don't consider inactive or render dependency graphs, since they might be evaluated for a + * different number of childrem. or have different pointer to evaluated particle system or + * modifier which will also cause troubles. */ + if (edit && DEG_is_active(depsgraph)) { edit->pid = *pid; if (edit->flags & PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL) { - if (edit->psys != NULL) { + if (edit->psys != NULL && edit->psys_eval != NULL) { psys_copy_particles(edit->psys, edit->psys_eval); pe_update_hair_particle_edit_pointers(edit); } |