cull: Fix crash caused by freeing a cull object with empty volume

This commit is contained in:
Disyer
2025-01-11 21:32:52 +02:00
parent be382a8f29
commit cc6646a448
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ add_object(CullableObject *object, Thread *current_thread) {
// Determine the center of the bounding volume.
CPT(BoundingVolume) volume = object->_geom->get_bounds(current_thread);
if (volume->is_empty()) {
delete object;
// No point in culling objects with no volume.
return;
}

View File

@@ -40,7 +40,7 @@ add_object(CullableObject *object, Thread *current_thread) {
// Determine the center of the bounding volume.
CPT(BoundingVolume) volume = object->_geom->get_bounds();
if (volume->is_empty()) {
delete object;
// No point in culling objects with no volume.
return;
}