From fcc5d7c29e02eae1429009cc02eb9c75d159f245 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 7 Jun 2018 16:38:52 +0200 Subject: Draw: Fix crash when tryign to get procedural textures with modifier disabled Maybe disabled modifier check should be done higher in the call hierarchy. --- source/blender/draw/intern/draw_cache_impl_particles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/draw/intern/draw_cache_impl_particles.c') 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); -- cgit v1.2.3