handle potentially empty ptrs

pull/3236/head
Cody Glassman 5 months ago
parent 45cb3eb081
commit 8105c62a02

@ -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

Loading…
Cancel
Save