Fix #26203: crash with empty raytree, all types should survive this now.
Also added a check for -inf/inf bounding boxes, just to be sure.
This commit is contained in:
@@ -98,13 +98,17 @@ void bvh_done<VBVHTree>(VBVHTree *obj)
|
||||
return;
|
||||
}
|
||||
|
||||
reorganize(root);
|
||||
remove_useless(root, &root);
|
||||
bvh_refit(root);
|
||||
|
||||
pushup(root);
|
||||
pushdown(root);
|
||||
obj->root = root;
|
||||
if(root) {
|
||||
reorganize(root);
|
||||
remove_useless(root, &root);
|
||||
bvh_refit(root);
|
||||
|
||||
pushup(root);
|
||||
pushdown(root);
|
||||
obj->root = root;
|
||||
}
|
||||
else
|
||||
obj->root = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user