diff options
Diffstat (limited to 'source/blender/render/intern/raytrace/rayobject_qbvh.cpp')
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject_qbvh.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp index fb23165a6e0..331358f727b 100644 --- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp @@ -80,9 +80,12 @@ void bvh_done<QBVHTree>(QBVHTree *obj) return; } - pushup_simd<VBVHNode,4>(root); - - obj->root = Reorganize_SVBVH<VBVHNode>(arena2).transform(root); + if(root) { + pushup_simd<VBVHNode,4>(root); + obj->root = Reorganize_SVBVH<VBVHNode>(arena2).transform(root); + } + else + obj->root = NULL; //Free data BLI_memarena_free(arena1); |