From b6954c8da1c4aa9816bccf246d80f134f7da90cc Mon Sep 17 00:00:00 2001 From: Mai Lavelle Date: Thu, 2 Jun 2016 20:57:04 -0400 Subject: Cycles: Fix regression introduced in c96a4c8 A few places still needed to be updated to use the new Mesh::num_triangles() method; wrong number from triangles.size() was causing crashes. --- intern/cycles/bvh/bvh_split.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/bvh/bvh_split.cpp') diff --git a/intern/cycles/bvh/bvh_split.cpp b/intern/cycles/bvh/bvh_split.cpp index 3665fb42bc2..bf68b41021f 100644 --- a/intern/cycles/bvh/bvh_split.cpp +++ b/intern/cycles/bvh/bvh_split.cpp @@ -404,7 +404,7 @@ void BVHSpatialSplit::split_object_reference(const Object *object, BoundBox& right_bounds) { Mesh *mesh = object->mesh; - for(int tri_idx = 0; tri_idx < mesh->triangles.size(); ++tri_idx) { + for(int tri_idx = 0; tri_idx < mesh->num_triangles(); ++tri_idx) { split_triangle_primitive(mesh, &object->tfm, tri_idx, -- cgit v1.2.3