diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2020-06-25 12:06:56 +0300 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2020-06-25 12:06:56 +0300 |
commit | 6b53e0adbc5fee508da580bdb8feb596e36751bc (patch) | |
tree | ab272250bbabd7a32d1557c816b4e763b949113f | |
parent | cdb69c20e1b234ce90ae68fcf3134f77ca5cd70f (diff) |
Better fix for crash ( with gpu only ) on render end/abort introduced in 0dced1a
-rw-r--r-- | intern/cycles/render/geometry.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index 291905ac60d..3e18661ecf7 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -1409,12 +1409,11 @@ void GeometryManager::device_update(Device *device, void GeometryManager::device_free(Device *device, DeviceScene *dscene) { #ifdef WITH_EMBREE - if (dscene->data.bvh.bvh_layout == BVH_LAYOUT_EMBREE) { - if (dscene->data.bvh.scene) { + if (dscene->data.bvh.scene) { + if (dscene->data.bvh.bvh_layout == BVH_LAYOUT_EMBREE) BVHEmbree::destroy(dscene->data.bvh.scene); - dscene->data.bvh.scene = NULL; + dscene->data.bvh.scene = NULL; } - } #endif dscene->bvh_nodes.free(); |