summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-08-29 18:32:42 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-08-29 18:32:42 +0300
commit1bc652075b009f89da56d39d672b0120b1ccfd15 (patch)
tree05bff13588c587172fcbf90be12d468f777516a5 /indra/newview
parent6897ad72ff1774f286acd3ddebdc11fc2e0b5f23 (diff)
SL-10536 Crash in getPosRegionFromAgent
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcontrolavatar.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 92eeebd705..f0682dc1ba 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -171,7 +171,10 @@ void LLControlAvatar::matchVolumeTransform()
if (attached_av)
{
LLViewerJointAttachment *attach = attached_av->getTargetAttachmentPoint(mRootVolp);
- setPositionAgent(mRootVolp->getRenderPosition());
+ if (getRegion() && !isDead())
+ {
+ setPositionAgent(mRootVolp->getRenderPosition());
+ }
attach->updateWorldPRSParent();
LLVector3 joint_pos = attach->getWorldPosition();
LLQuaternion joint_rot = attach->getWorldRotation();
@@ -227,7 +230,10 @@ void LLControlAvatar::matchVolumeTransform()
#endif
setRotation(bind_rot*obj_rot);
mRoot->setWorldRotation(bind_rot*obj_rot);
- setPositionAgent(vol_pos);
+ if (getRegion() && !isDead())
+ {
+ setPositionAgent(vol_pos);
+ }
mRoot->setPosition(vol_pos + mPositionConstraintFixup);
F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale");