Fix T103307: Crash reading particle hair key.co
05952aa94d accessed the vertex array when the mesh was null.
This commit is contained in:
@@ -212,8 +212,8 @@ static void rna_ParticleHairKey_location_object_get(PointerRNA *ptr, float *valu
|
||||
|
||||
if (pa) {
|
||||
Mesh *hair_mesh = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_mesh : NULL;
|
||||
const MVert *verts = BKE_mesh_verts(hair_mesh);
|
||||
if (hair_mesh) {
|
||||
const MVert *verts = BKE_mesh_verts(hair_mesh);
|
||||
const MVert *mv = &verts[pa->hair_index + (hkey - pa->hair)];
|
||||
copy_v3_v3(values, mv->co);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user