diff options
author | Eli Linden <eli@lindenlab.com> | 2010-02-05 13:19:16 -0800 |
---|---|---|
committer | Eli Linden <eli@lindenlab.com> | 2010-02-05 13:19:16 -0800 |
commit | 4c4925e8afaff67a132ed2b43f916792e7fbb4a8 (patch) | |
tree | 6d1fdd1a09cc5a22e319a634c99e063da9f2fc18 /indra/newview/llviewerobject.cpp | |
parent | dcf82b742a90b9004d7cd0a6be6610a6195e693e (diff) | |
parent | 977de17dda0b3bf5e7ae96f68b329ef0297ce7fd (diff) |
Merge
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(); |