diff options
author | Karl Stiefvater (qarl) <qarl@lindenlab.com> | 2010-03-19 12:09:06 -0500 |
---|---|---|
committer | Karl Stiefvater (qarl) <qarl@lindenlab.com> | 2010-03-19 12:09:06 -0500 |
commit | f50be64167c254e27f635ad47d8940551f0c6ab4 (patch) | |
tree | 288c6259c5a166a9759247a715aa5a59754f73b0 | |
parent | 1a28e325c4d148d2322bc9becb672abf99315a96 (diff) |
EXT-6421 [crashhunters] Crash in LLViewerObject::getBoundingBoxAgent()
added null guard to fix crash when the xform has no parent. reviewed by davep.
-rw-r--r-- | indra/newview/llviewerobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index b5642d07a5..6c8346df86 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4029,7 +4029,8 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const avatar_parent = (LLViewerObject*)root_edit->getParent(); } - if (avatar_parent && avatar_parent->isAvatar() && root_edit && root_edit->mDrawable.notNull()) + if (avatar_parent && avatar_parent->isAvatar() && + root_edit && root_edit->mDrawable.notNull() && root_edit->mDrawable->getXform()->getParent()) { LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent(); position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition(); |