[Bf-blender-cvs] [77599a6] fracture_modifier: fix for crash of loading files with split shards or island detection in fracture
Martin Felke
noreply at git.blender.org
Mon Nov 28 00:53:14 CET 2016
Commit: 77599a6be05aae45014c672d809f3a0eacb2eb4c
Author: Martin Felke
Date: Mon Nov 28 00:52:46 2016 +0100
Branches: fracture_modifier
https://developer.blender.org/rB77599a6be05aae45014c672d809f3a0eacb2eb4c
fix for crash of loading files with split shards or island detection in fracture
===================================================================
M source/blender/modifiers/intern/MOD_fracture.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index a46d2f9..be09e78 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -1906,7 +1906,7 @@ static int do_shard_to_island(FractureModifierData *fmd, BMesh* bm_new, ShardID
s = BKE_custom_data_to_shard(s, dmtemp);
/*for dynamic mode, store this in the main shardmap instead of separately */
- if (fmd->fracture_mode == MOD_FRACTURE_DYNAMIC && (&fmd->frac_mesh->shard_map != NULL)) {
+ if (fmd->fracture_mode == MOD_FRACTURE_DYNAMIC) {
#if 0
/*delete all with same parent id and replace*/
Shard *t;
@@ -1925,15 +1925,12 @@ static int do_shard_to_island(FractureModifierData *fmd, BMesh* bm_new, ShardID
BLI_addtail(&fmd->frac_mesh->shard_map, s);
fmd->frac_mesh->shard_count = id + 1;
}
- else if (!BLI_listbase_is_empty(&fmd->islandShards)){
+ else {
id = BLI_listbase_count(&fmd->islandShards);
s->shard_id = id;
s->parent_id = -1;
BLI_addtail(&fmd->islandShards, s);
}
- else {
- id = -1;
- }
dmtemp->needsFree = 1;
dmtemp->release(dmtemp);
More information about the Bf-blender-cvs
mailing list