summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-02-05 16:15:43 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-02-05 16:15:43 -0500
commit443993bc19f4517ec41f896443d71110fb6202a7 (patch)
tree12c7513b7b90b1179bd0f3b5f4f36232434648df /indra/newview/llviewerobject.cpp
parent456bbdfa2f3471896f6981e70a9daa56dae51d18 (diff)
EXT-4739 - Crash on teleport after viewer minimize. Making sure we don't accidentally set av self to null & added a few more null checks.
-Reviewed by nyx
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp9
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();