diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-07 17:38:52 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-07 17:40:15 +0300 |
commit | fcc5d7c29e02eae1429009cc02eb9c75d159f245 (patch) | |
tree | e4e82297bea4ced8a31ad22fb359b5539aacd318 /source/blender/draw/intern/draw_cache_impl_particles.c | |
parent | 64e0ab6a00c46faa424f689fd029fa42d418e287 (diff) |
Draw: Fix crash when tryign to get procedural textures with modifier disabled
Maybe disabled modifier check should be done higher in the call hierarchy.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_particles.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_particles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c index 1348968bad7..46469136243 100644 --- a/source/blender/draw/intern/draw_cache_impl_particles.c +++ b/source/blender/draw/intern/draw_cache_impl_particles.c @@ -779,7 +779,7 @@ static void particle_batch_cache_ensure_procedural_strand_data( ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md; - if (psmd != NULL) { + if (psmd != NULL && psmd->mesh_final != NULL) { if (CustomData_has_layer(&psmd->mesh_final->ldata, CD_MLOOPUV)) { cache->num_uv_layers = CustomData_number_of_layers(&psmd->mesh_final->ldata, CD_MLOOPUV); active_uv = CustomData_get_active_layer(&psmd->mesh_final->ldata, CD_MLOOPUV); |