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:
authorDaniel Genrich <daniel.genrich@gmx.net>2008-02-05 18:09:48 +0300
committerDaniel Genrich <daniel.genrich@gmx.net>2008-02-05 18:09:48 +0300
commita8c25e279d2209665cf7f561c4cb32837dc83aa3 (patch)
tree4f19960e18dceebe0066f1d4e5fb6f308140153c /source/blender/blenkernel/intern/cloth.c
parent7a70e5c0c0eacda814ffc32035a649a88b5326d0 (diff)
Cloth: Fix for crash with meshes with no faces, 2. Fix for crash on switching from to another mesh
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index e27df5b1ba1..5d0601959cc 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -51,6 +51,7 @@
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
+#include "BLI_editVert.h"
#include "BLI_edgehash.h"
#include "BLI_linklist.h"
@@ -203,6 +204,10 @@ BVH *bvh_build_from_cloth (ClothModifierData *clmd, float epsilon)
verts = cloth->verts;
+ // in the moment, return zero if no faces there
+ if(!cloth->numfaces)
+ return NULL;
+
bvh = MEM_callocN(sizeof(BVH), "BVH");
if (bvh == NULL)
{