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
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2020-03-02 17:00:33 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-03-02 17:02:24 +0300
commit1648a7903672604dca096d49b282cf737dd9e661 (patch)
treeba59bd0f169a00d15ff5592bc615c3ca706dbd67 /source/blender/blenkernel/intern/cloth.c
parent9c4523b1fde4419b8b59744f03b3fffbb2571436 (diff)
Fix T74295: Cloth + Internal springs crashes on a non-polygonal geometry
Added check to see if the mesh has any polygons at all. If there are no polygons, the bvh tree data will consist of null pointers, so skip internal springs if this is the case.
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 7332c3e0d43..45b3148c656 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -1578,7 +1578,7 @@ static int cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
bool use_internal_springs = (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS);
- if (use_internal_springs) {
+ if (use_internal_springs && numpolys > 0) {
BVHTreeFromMesh treedata = {NULL};
unsigned int tar_v_idx;
BLI_bitmap *verts_used = NULL;