diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-03 21:42:24 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-03 21:42:24 +0400 |
commit | 1ab9fc59b750b1dc5ebaacd30c6891949895a10d (patch) | |
tree | 8ec4f21a0f7124aef255d5519fb3ac2fb3ad0d3b /intern/cycles/bvh/bvh_build.cpp | |
parent | da8f71bffb1a33c695a368c1243b8aa9ac54c21d (diff) |
Cycles: fix a few more msvc issues with empty scenes and ustring setting.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh_build.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index d3e84e11d53..67cff3f5873 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -270,7 +270,8 @@ BVHNode* BVHBuild::create_leaf_node(const NodeSpec& spec) /* while there may be multiple triangles in a leaf, for object primitives * we want them to be the only one, so we */ int ob_num = spec.num - num; - BVHNode *oleaf = create_object_leaf_nodes(&references.back() - (ob_num - 1), ob_num); + const Reference *ref = (ob_num)? &references.back() - (ob_num - 1): NULL; + BVHNode *oleaf = create_object_leaf_nodes(ref, ob_num); for(int i = 0; i < ob_num; i++) references.pop_back(); |