From 1841b129002968da50b990a0075749b4598fb609 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 22 Jan 2015 14:27:13 +0500 Subject: [PATCH] Cycles: Add assert check to triangle packing Handy for troubleshooting. --- intern/cycles/bvh/bvh.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index 947f6fe67d8..376a7f8a656 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())