mirror of
https://github.com/panda3d/panda3d.git
synced 2025-12-30 11:39:48 -06:00
cull: Fix crash caused by freeing a cull object with empty volume
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user