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:
authorJanne Karhu <jhkarh@gmail.com>2011-03-28 12:27:19 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-03-28 12:27:19 +0400
commite5bf21898ea7fdc9d13b4f046fcbcf16064c6df4 (patch)
tree92d9393c8eae3823005c5d44cccd33d48a7af961 /source/blender/editors/object/object_modifier.c
parent72b4bf2fda227ede4f6308f7171c4a74c22f02b8 (diff)
Fix for [#26617] convert hair particles to mesh crash rev:35787
* Hair to mesh conversion wasn't making sure the hairs had valid keys * Patch by Sergey Sharybin
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index b57935bc392..ff1b693d0e1 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -309,15 +309,21 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
cache= psys->pathcache;
for(a=0; a<totpart; a++) {
key= cache[a];
- totvert+= key->steps+1;
- totedge+= key->steps;
+
+ if(key->steps > 0) {
+ totvert+= key->steps+1;
+ totedge+= key->steps;
+ }
}
cache= psys->childcache;
for(a=0; a<totchild; a++) {
key= cache[a];
- totvert+= key->steps+1;
- totedge+= key->steps;
+
+ if(key->steps > 0) {
+ totvert+= key->steps+1;
+ totedge+= key->steps;
+ }
}
if(totvert==0) return 0;