[Bf-blender-cvs] [1841b12] master: Cycles: Add assert check to triangle packing

Sergey Sharybin noreply at git.blender.org
Thu Jan 22 10:58:57 CET 2015


Commit: 1841b129002968da50b990a0075749b4598fb609
Author: Sergey Sharybin
Date:   Thu Jan 22 14:27:13 2015 +0500
Branches: master
https://developer.blender.org/rB1841b129002968da50b990a0075749b4598fb609

Cycles: Add assert check to triangle packing

Handy for troubleshooting.

===================================================================

M	intern/cycles/bvh/bvh.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index 947f6fe..376a7f8 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -263,6 +263,7 @@ void BVH::refit(Progress& progress)
 void BVH::pack_triangle(int idx, float4 woop[3])
 {
 	int tob = pack.prim_object[idx];
+	assert(tob >= 0 && tob < objects.size());
 	const Mesh *mesh = objects[tob]->mesh;
 
 	if(mesh->has_motion_blur())




More information about the Bf-blender-cvs mailing list