diff options
Diffstat (limited to 'source/blender/render/intern/raytrace/rayobject_svbvh.cpp')
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject_svbvh.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp index 3a29ac29390..a99c57ab233 100644 --- a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp @@ -115,8 +115,12 @@ void bvh_done<SVBVHTree>(SVBVHTree *obj) return; } - VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root); - obj->root = Reorganize_SVBVH<OVBVHNode>(arena2).transform(root); + if(root) { + VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root); + obj->root = Reorganize_SVBVH<OVBVHNode>(arena2).transform(root); + } + else + obj->root = NULL; } //Free data |