diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-03 04:40:53 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-03 04:40:53 +0400 |
commit | 4574dbea98342e862962923101176a309aec3ebb (patch) | |
tree | 43e4f0852cf2f4e862830b95a53f83edcfe52bde /source/blender | |
parent | feb603248e6d619a20a8664a922b367d14b531ff (diff) |
Bugfix: crash with strand surface AAO and layer ipo's.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/occlusion.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index a4d75c032e5..d70c51b83bc 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -1475,7 +1475,7 @@ static void sample_occ_surface(ShadeInput *shi) int *face, *index = RE_strandren_get_face(shi->obr, strand, 0); float w[4], *co1, *co2, *co3, *co4; - if(mesh && index) { + if(mesh && mesh->face && mesh->co && mesh->col && index) { face= mesh->face[*index]; co1= mesh->co[face[0]]; @@ -1555,6 +1555,9 @@ void make_occ_tree(Render *re) occ_compute_passes(re, re->occlusiontree, re->wrld.ao_approx_passes); for(mesh=re->strandsurface.first; mesh; mesh=mesh->next) { + if(!mesh->face || !mesh->co || !mesh->col) + continue; + count= MEM_callocN(sizeof(int)*mesh->totvert, "OcclusionCount"); facecol= MEM_callocN(sizeof(float)*3*mesh->totface, "StrandSurfFaceCol"); |