Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-01-16 16:52:01 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-16 16:58:45 +0300
commit3c426feb127271994ad4de7178dc166831f30b00 (patch)
tree05df5a527786afbb293242fa0c0e50e84467c762 /source
parent9a6551543b92d54e7d565570988271e461104a89 (diff)
Fix T73121: Blender crashes on accessing particle uv_on_emitter
Blender wasn't checking whether the passed modifier actually contained an evaluated mesh, before accessing the mesh pointer.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 4da42eb6bba..0ed9678ae06 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -286,6 +286,11 @@ static void rna_Particle_uv_on_emitter(ParticleData *particle,
psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, nor, 0, 0, sd.orco, 0);
# endif
+ if (modifier->mesh_final == NULL) {
+ BKE_report(reports, RPT_ERROR, "uv_on_emitter() requires a modifier from an evaluated object");
+ return;
+ }
+
/* get uvco & mcol */
int num = particle->num_dmcache;
int from = modifier->psys->part->from;