Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-07-04 11:42:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-07-04 16:47:41 +0300
commit7ba096e1e72d99c2c43986cf009b14dfbea539a4 (patch)
tree33d2d6bf280cc5269a27f95416bf8aeee71b19d7 /source/blender/blenkernel/intern/particle.c
parent9e8e479a52206be6cd2ce0440730bdb75e05f297 (diff)
Fix T63788: Crash if particle system is turned off in particle editing mode
Make sure particle system edit never points to a modifier or particle system which becomes inactive. This is needed because copy-on-write will change pointers of them and those pointers are supposed to be restored from particle system evaluation. But since the particle system is disabled it never updates pointers. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D5180
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 13649eaf096..975e180545f 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3291,6 +3291,10 @@ void psys_cache_edit_paths(Depsgraph *depsgraph,
int segments = 1 << pset->draw_step;
int totpart = edit->totpoint, recalc_set = 0;
+ if (edit->psmd_eval == NULL) {
+ return;
+ }
+
segments = MAX2(segments, 4);
if (!cache || edit->totpoint != edit->totcached) {