diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-02-08 14:58:53 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-02-08 14:58:53 -0500 |
commit | 399d70eede54dff2ba6d14b33f85fdad4d33a662 (patch) | |
tree | ce922e0963b8d46c236c4320b574916507fa3b65 /indra/newview/llviewerobject.cpp | |
parent | 7e1932878563e5847335d5dcb66c9b23232c372c (diff) | |
parent | 19f4240f977fc26d97e686c4e3a1f13b063e191c (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 886f1d9ef5..d0afa9d9de 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4019,9 +4019,14 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const { LLVector3 position_agent; LLQuaternion rot; + LLViewerObject* avatar_parent = NULL; LLViewerObject* root_edit = (LLViewerObject*)getRootEdit(); - LLViewerObject* avatar_parent = (LLViewerObject*)root_edit->getParent(); - if (avatar_parent && avatar_parent->isAvatar() && root_edit->mDrawable.notNull()) + if (root_edit) + { + avatar_parent = (LLViewerObject*)root_edit->getParent(); + } + + if (avatar_parent && avatar_parent->isAvatar() && root_edit && root_edit->mDrawable.notNull()) { LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent(); position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition(); |