[Bf-blender-cvs] [fcc5d7c29e0] blender2.8: Draw: Fix crash when tryign to get procedural textures with modifier disabled

Sergey Sharybin noreply at git.blender.org
Thu Jun 7 16:40:21 CEST 2018


Commit: fcc5d7c29e02eae1429009cc02eb9c75d159f245
Author: Sergey Sharybin
Date:   Thu Jun 7 16:38:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBfcc5d7c29e02eae1429009cc02eb9c75d159f245

Draw: Fix crash when tryign to get procedural textures with modifier disabled

Maybe disabled modifier check should be done higher in the call hierarchy.

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

M	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);



More information about the Bf-blender-cvs mailing list