summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-10-03 13:07:46 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-10-03 13:07:46 -0400
commit38f4e4d5b4cc61701588276f729253ac1721b784 (patch)
tree56b4e824c0ca365bb4e02201df7925caea9843fe /indra/newview/llvovolume.cpp
parent285bb44d4cc7e47be474d431d65014ad4e41892b (diff)
parent2465470817957c8378e81ec1a7e32551fbac7b26 (diff)
DRTVWR-589: Merge branch 'main' of viewer-private into DRTVWR-589
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4ddba872f1..269c5666cc 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5114,8 +5114,6 @@ void LLControlAVBridge::updateSpatialExtents()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
- LLControlAvatar* controlAvatar = getVObj()->getControlAvatar();
-
LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0);
bool rootWasDirty = root->isDirty();
@@ -5126,7 +5124,11 @@ void LLControlAVBridge::updateSpatialExtents()
// disappear when root goes off-screen"
//
// Expand extents to include Control Avatar placed outside of the bounds
- if (controlAvatar && (rootWasDirty || controlAvatar->mPlaying))
+ LLControlAvatar* controlAvatar = getVObj() ? getVObj()->getControlAvatar() : NULL;
+ if (controlAvatar
+ && controlAvatar->mDrawable
+ && controlAvatar->mDrawable->getEntry()
+ && (rootWasDirty || controlAvatar->mPlaying))
{
root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform());
}