mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-06 21:11:37 +00:00
handle potentially empty ptrs
This commit is contained in:
parent
45cb3eb081
commit
8105c62a02
1 changed files with 3 additions and 0 deletions
|
@ -1659,6 +1659,9 @@ namespace MWRender
|
||||||
|
|
||||||
osg::BoundingBox RenderingManager::getCullSafeBoundingBox(const MWWorld::Ptr& ptr) const
|
osg::BoundingBox RenderingManager::getCullSafeBoundingBox(const MWWorld::Ptr& ptr) const
|
||||||
{
|
{
|
||||||
|
if (ptr.isEmpty())
|
||||||
|
return {};
|
||||||
|
|
||||||
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> rootNode = ptr.getRefData().getBaseNode();
|
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
|
// Recalculate bounds on the ptr's template when the object is not loaded or is loaded but paged
|
||||||
|
|
Loading…
Reference in a new issue