Fix crashing on render end/abort introduced in 0dced1a

This commit is contained in:
Jens Verwiebe
2020-06-24 23:51:57 +02:00
parent eace5903cb
commit ec776f18ff
+5 -3
View File
@@ -1409,9 +1409,11 @@ void GeometryManager::device_update(Device *device,
void GeometryManager::device_free(Device *device, DeviceScene *dscene)
{
#ifdef WITH_EMBREE
if (dscene->data.bvh.scene) {
BVHEmbree::destroy(dscene->data.bvh.scene);
dscene->data.bvh.scene = NULL;
if (dscene->data.bvh.bvh_layout == BVH_LAYOUT_EMBREE) {
if (dscene->data.bvh.scene) {
BVHEmbree::destroy(dscene->data.bvh.scene);
dscene->data.bvh.scene = NULL;
}
}
#endif