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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-05-22 17:58:16 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-05-22 17:58:16 +0400
commitbe1cb6e5e25bcf7d32b1333b87a80106899f5df0 (patch)
tree9feb73ae66ddeb799c1750572203b243df535b0c /source/blender/blenkernel/intern/softbody.c
parent5cf41da316001ddedd0e11ec2fa4648c02cb97c4 (diff)
Fix for bug #11758: crash cancelling hair softbody bake.
Fix for bug #11966: crash in hair softbody with hair amount 0.
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 768f5ff980e..9005db1312f 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -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;