[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35840] trunk/blender/source/blender/ editors/object/object_modifier.c: Fix for [#26617] convert hair particles to mesh crash rev:35787
Janne Karhu
jhkarh at gmail.com
Mon Mar 28 10:27:19 CEST 2011
Revision: 35840
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35840
Author: jhk
Date: 2011-03-28 08:27:19 +0000 (Mon, 28 Mar 2011)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/blender/editors/object/object_modifier.c
Modified: trunk/blender/source/blender/editors/object/object_modifier.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_modifier.c 2011-03-28 08:08:59 UTC (rev 35839)
+++ trunk/blender/source/blender/editors/object/object_modifier.c 2011-03-28 08:27:19 UTC (rev 35840)
@@ -309,15 +309,21 @@
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;
More information about the Bf-blender-cvs
mailing list