1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00

handle potentially empty ptrs

This commit is contained in:
Cody Glassman 2024-07-19 16:10:36 -07:00
parent 45cb3eb081
commit 8105c62a02

View File

@ -1659,6 +1659,9 @@ namespace MWRender
osg::BoundingBox RenderingManager::getCullSafeBoundingBox(const MWWorld::Ptr& ptr) const
{
if (ptr.isEmpty())
return {};
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> rootNode = ptr.getRefData().getBaseNode();
// Recalculate bounds on the ptr's template when the object is not loaded or is loaded but paged