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>2018-06-06 14:51:57 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-06 14:54:39 +0300
commit1295e85de0d2b51f6e7c79df8b1b63db7414db0e (patch)
tree30f249c8f1ea8c3990efd34c9e85425a5f08d4a9 /source/blender
parent528cdf9b504d9d42dadc8a70464026101d29803f (diff)
Particle edit: Fix crash when trying to edit particles without cache
Particles in EMITTER mode needs to have cache.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/modes/particle_mode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/modes/particle_mode.c b/source/blender/draw/modes/particle_mode.c
index dacd4b72834..19c3ddd4b50 100644
--- a/source/blender/draw/modes/particle_mode.c
+++ b/source/blender/draw/modes/particle_mode.c
@@ -183,6 +183,12 @@ static void particle_cache_populate(void *vedata, Object *object)
Object *object_orig = DEG_get_original_object(object);
PTCacheEdit *edit = PE_create_current(
draw_ctx->depsgraph, scene_orig, object_orig);
+ if (edit == NULL) {
+ /* Happens when trying to edit particles in EMITTER mode without
+ * having them cached.
+ */
+ return;
+ }
/* NOTE: We need to pass evaluated particle system, which we need
* to find first.
*/