[Bf-blender-cvs] [7ccbc66] fracture_modifier: crash fix when fracturing, missed initalization of listbase and quiet some warnings
Martin Felke
noreply at git.blender.org
Fri Oct 10 16:30:13 CEST 2014
Commit: 7ccbc6651b02d72d806a539b31555c7e71db838c
Author: Martin Felke
Date: Fri Oct 10 16:07:17 2014 +0200
Branches: fracture_modifier
https://developer.blender.org/rB7ccbc6651b02d72d806a539b31555c7e71db838c
crash fix when fracturing, missed initalization of listbase and quiet some warnings
===================================================================
M source/blender/blenkernel/intern/fracture.c
M source/blender/blenloader/intern/readfile.c
M source/blender/modifiers/intern/MOD_fracture.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 170707a..9ad2142 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -350,8 +350,8 @@ FracMesh *BKE_create_fracture_container(void)
FracMesh *fmesh;
fmesh = MEM_mallocN(sizeof(FracMesh), __func__);
-
-// fmesh->shard_map = MEM_mallocN(sizeof(Shard *), __func__); /* allocate in chunks ?, better use proper blender functions for this*/
+ fmesh->shard_map.first = NULL;
+ fmesh->shard_map.last = NULL;
fmesh->shard_count = 0;
fmesh->cancel = 0;
fmesh->running = 0;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3dca493..9d1852c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4961,7 +4961,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
lmd->cache_system = NULL;
}
else if (md->type == eModifierType_Fracture) {
- int i = 0;
FractureModifierData *fmd = (FractureModifierData *)md;
FracMesh* fm;
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index a12f71a..b1feae3 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -2218,7 +2218,7 @@ DerivedMesh *doSimulate(FractureModifierData *fmd, Object *ob, DerivedMesh *dm,
Shard *s;
MeshIsland *mi; /* can be created without shards even, when using fracturemethod = NONE (re-using islands)*/
- int i, j, vertstart = 0, polystart = 0;
+ int j, vertstart = 0, polystart = 0;
float dummyloc[3], rot[4];
MDeformVert *dvert = fmd->dm->getVertDataArray(fmd->dm, CD_MDEFORMVERT);
More information about the Bf-blender-cvs
mailing list