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

Particles in EMITTER mode needs to have cache.
This commit is contained in:
2018-06-06 13:51:57 +02:00
parent 528cdf9b50
commit 1295e85de0

View File

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