diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-09 16:55:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-09 16:55:16 +0400 |
commit | facb1512c097189e50808f6aca7c9f0b0280d2dc (patch) | |
tree | 21cd1a55bb3da13190b2a7a619cbae80ab800942 /intern | |
parent | 98969c64ff69d8a35bd9a3dff7bc48cf40f1175e (diff) |
fix/workaround for cycles crash packing bvh
brecht - when you get time please look into this to see if the fix is ok.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/bvh/bvh.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index a383ad317ab..bdcd3b6ba19 100644 --- a/intern/cycles/bvh/bvh.cpp +++ b/intern/cycles/bvh/bvh.cpp @@ -378,10 +378,19 @@ void BVH::pack_instances(size_t nodes_size) int mesh_tri_offset = mesh->tri_offset; /* fill in node indexes for instances */ - if(bvh->pack.is_leaf[0]) + if( + /* XXX, brecht. check this is needed!. it could be a bug elsewhere + * /mango/pro/scenes/04_2e/04_2e.blend r2158. on Ian's system 192.168.3.27 - campbell */ + (bvh->pack.is_leaf.size() != 0) && + + /* previously only checked this */ + bvh->pack.is_leaf[0]) + { pack.object_node[object_offset++] = -noffset-1; - else + } + else { pack.object_node[object_offset++] = noffset; + } mesh_map[mesh] = pack.object_node[object_offset-1]; |