diff options
Diffstat (limited to 'source/blender/render/intern/raytrace/rayobject_svbvh.cpp')
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject_svbvh.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp index c4e30f97881..a99c57ab233 100644 --- a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp @@ -27,6 +27,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/render/intern/raytrace/rayobject_svbvh.cpp + * \ingroup render + */ + + #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" @@ -110,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 |