[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16577] trunk/blender/source/blender/ blenkernel/intern/particle_system.c: Fix for [#17637] Children from "Faces" in Object without a face leads to crash
Janne Karhu
jhkarh at utu.fi
Wed Sep 17 19:59:42 CEST 2008
Revision: 16577
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16577
Author: jhk
Date: 2008-09-17 19:59:29 +0200 (Wed, 17 Sep 2008)
Log Message:
-----------
Fix for [#17637] Children from "Faces" in Object without a face leads to crash
- a simple check for psys->child was missing
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle_system.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c 2008-09-17 17:47:59 UTC (rev 16576)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c 2008-09-17 17:59:29 UTC (rev 16577)
@@ -1128,12 +1128,14 @@
if(children){
if(G.f & G_DEBUG)
fprintf(stderr,"Particle child distribution error: Nothing to emit from!\n");
- for(p=0,cpa=psys->child; p<totpart; p++,cpa++){
- cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3]= 0.0;
- cpa->foffset= 0.0f;
- cpa->parent=0;
- cpa->pa[0]=cpa->pa[1]=cpa->pa[2]=cpa->pa[3]=0;
- cpa->num= -1;
+ if(psys->child) {
+ for(p=0,cpa=psys->child; p<totpart; p++,cpa++){
+ cpa->fuv[0]=cpa->fuv[1]=cpa->fuv[2]=cpa->fuv[3]= 0.0;
+ cpa->foffset= 0.0f;
+ cpa->parent=0;
+ cpa->pa[0]=cpa->pa[1]=cpa->pa[2]=cpa->pa[3]=0;
+ cpa->num= -1;
+ }
}
}
else {
More information about the Bf-blender-cvs
mailing list