Commit: 1295e85de0d2b51f6e7c79df8b1b63db7414db0e
Author: Sergey Sharybin
Date:   Wed Jun 6 13:51:57 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1295e85de0d2b51f6e7c79df8b1b63db7414db0e

Particle edit: Fix crash when trying to edit particles without cache

Particles in EMITTER mode needs to have cache.

===================================================================

M       source/blender/draw/modes/particle_mode.c

===================================================================

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.
         */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to