Fix for bug #11758: crash cancelling hair softbody bake.
Fix for bug #11966: crash in hair softbody with hair amount 0.
This commit is contained in:
@@ -2401,8 +2401,11 @@ void psys_cache_paths(Object *ob, ParticleSystem *psys, float cfra, int editupda
|
||||
psys->pathcache= cache;
|
||||
}
|
||||
|
||||
if(edit==NULL && psys->soft && psys->softflag & OB_SB_ENABLE)
|
||||
if(edit==NULL && psys->soft && psys->softflag & OB_SB_ENABLE) {
|
||||
soft = psys->soft;
|
||||
if(!soft->bpoint)
|
||||
soft= NULL;
|
||||
}
|
||||
|
||||
psys->lattice = psys_get_lattice(ob, psys);
|
||||
ma= give_current_material(ob, psys->part->omat);
|
||||
|
||||
@@ -3390,8 +3390,9 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo
|
||||
int a;
|
||||
|
||||
/* update the vertex locations */
|
||||
if(sb->particles) {
|
||||
if(sb->particles && sb->particles->totpart>0) {
|
||||
psmd= psys_get_modifier(ob,sb->particles);
|
||||
|
||||
pa= sb->particles->particles;
|
||||
key= pa->hair;
|
||||
|
||||
@@ -3434,7 +3435,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
|
||||
float hairmat[4][4];
|
||||
int a;
|
||||
|
||||
if(sb->particles) {
|
||||
if(sb->particles && sb->particles->totpart>0) {
|
||||
psmd= psys_get_modifier(ob, sb->particles);
|
||||
pa= sb->particles->particles;
|
||||
key= pa->hair;
|
||||
|
||||
Reference in New Issue
Block a user